Skip to content
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

Pylint configuration in pyproject.toml is ignored #485

Closed
noctuid opened this issue Feb 8, 2022 · 4 comments · Fixed by #489
Closed

Pylint configuration in pyproject.toml is ignored #485

noctuid opened this issue Feb 8, 2022 · 4 comments · Fixed by #489
Labels

Comments

@noctuid
Copy link

noctuid commented Feb 8, 2022

Currently, prospector seems to ignore any pylint configuration in the pyproject.toml file. For example, I have fixme and invalid-name disabled in the pyproject.toml. poetry run pylint shows no errors, but poetry run prospector --profile custom (with a profile that sets strictness none so these pylint errors are enabled by default) still shows fixme and invalid-name errors. If I use a .pylintrc, the errors go away, but I'd rather just configure everything in the pyproject.toml file.

I'm not sure how prospector is running pylint, but it would be nice if it could support pyproject.toml configuration by default.

@Pierre-Sassoulas
Copy link
Collaborator

What is happening if you're launching pylint directly ? Does it detect the pyproject.toml (it should in latest version) ? If not what happen when using the --rcfile option ?

@noctuid
Copy link
Author

noctuid commented Feb 9, 2022

If I launch pylint directly in a module that has a pyproject.toml, it detects it and works fine.

  • Run poetry run pylint <module name or file> in module directory that contains a pyproject.toml -> works
  • Run poetry run pylint <module name or file> in module's parent directory that contains a pyproject.toml (but module directory does not) -> does not work (not sure why this is)
  • Run poetry run pylint --rcfile ./pyproject.toml <module name or file> in same situation as above - works

poetry run prospector does not seem to work regardless of which directory I run it in or which directory I put the pyproject.toml. I have to manually specify --pylint-config-file pyproject.toml for it to work.

@carlio
Copy link
Contributor

carlio commented Feb 26, 2022

Fix merged onto master branch, will go out in next 1.7.1 release shortly

@noctuid
Copy link
Author

noctuid commented Mar 7, 2022

On 1.7.6, I still have to manually specify the config file path for both of the situations I specified above (repo root with pyproject.toml or module directory with pyproject.toml). Not sure if this has anything to do with running prospector through poetry. Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants