Skip to content

Clarify usage of pyproject.toml configuration file #5883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stefaneidelloth opened this issue Mar 9, 2022 · 1 comment
Closed

Clarify usage of pyproject.toml configuration file #5883

stefaneidelloth opened this issue Mar 9, 2022 · 1 comment
Labels
Duplicate 🐫 Duplicate of an already existing issue

Comments

@stefaneidelloth
Copy link

stefaneidelloth commented Mar 9, 2022

Question

If I use a pyproject.toml configuraiton file, some statements from

https://github.com/PyCQA/pylint/blob/main/pylintrc

would not be in the toml format (https://github.com/toml-lang/toml), for example:

# Pickle collected data for later comparisons.
persistent=yes

=> Do I need/should I adapt the expressions to conform to the toml format, e.g.
persistent=true

=> How to handle python expressions? Specify them as string?
Following expression gives warning: "-" unexpcted

evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)

Documentation for future user

=> Could you please provide an example pyproject.toml file containing all configuration options
(maybe put it next to https://github.com/PyCQA/pylint/blob/main/pylintrc )

=> Could you please clarify that point in the documentation?

https://pylint.pycqa.org/en/latest/user_guide/run.html

pyproject.toml in the current working directory, providing it has at least one tool.pylint. section. The pyproject.toml must prepend section names with tool.pylint., for example [tool.pylint.'MESSAGES CONTROL']. They can also be passed in on the command line.

Here some hint is missing, if the option values must be adapted for toml, e.g. from yes to true and from python math expression to string etc.

Additional context

Some warning shown by PyCharm if I open pyproject.toml containing pylint config:

image

@stefaneidelloth stefaneidelloth added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Mar 9, 2022
@Pierre-Sassoulas
Copy link
Member

Duplicate of #3181, It's on our radar (it's even one of the 3 currently pinned issues) but we have a lot on our plate already.

@Pierre-Sassoulas Pierre-Sassoulas added Duplicate 🐫 Duplicate of an already existing issue and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate 🐫 Duplicate of an already existing issue
Projects
None yet
Development

No branches or pull requests

2 participants