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

VS Code does not honor pylint pyproject.toml file under default settings #13321

Closed
danrneal opened this issue Aug 6, 2020 · 5 comments · Fixed by #16877
Closed

VS Code does not honor pylint pyproject.toml file under default settings #13321

danrneal opened this issue Aug 6, 2020 · 5 comments · Fixed by #16877
Assignees
Labels
area-linting bug Issue identified by VS Code Team member as probable bug

Comments

@danrneal
Copy link

danrneal commented Aug 6, 2020

Environment data

  • VS Code version: 1.47.3
  • Extension version (available under the Extensions sidebar): 2020.7.96456
  • OS and version: Ubuntu 18.04
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.2
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions: pylint 2.5.3
  • Value of the python.languageServer setting: default / Jedi

Expected behaviour

Under the default settings pyproject.toml, setup.cfg, or .pylintrc file configs would be applied

Actual behaviour

These settings not applied unless Pylint Use Minimal Checkers is unchecked or explicitly set to false

Steps to reproduce:

pyproject.toml

[tool.pylint.messages_control]
disable = "undefined-variable"

And then save a python variable with an undefined variable and you will see the lint error despite the message being disabled in the pyproject.toml file

@danrneal danrneal added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Aug 6, 2020
@karthiknadig karthiknadig changed the title Vscode does not honor pylint config file under default settings Vscode does not honor pylint pyproject.toml file under default settings Aug 10, 2020
@brettcannon brettcannon changed the title Vscode does not honor pylint pyproject.toml file under default settings VS Code does not honor pylint pyproject.toml file under default settings Aug 10, 2020
@karthiknadig
Copy link
Member

We do detect .pylintrc and pickup the settings from it. But we don't detect pyproject.toml and setup.cfg. Can you try .pylintrc, if that is not working can you share your project layout.

@karthiknadig karthiknadig self-assigned this Aug 10, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Aug 10, 2020
@danrneal
Copy link
Author

I can confirm that .pylintrc does in fact work as expected. It is only pyproject.toml and setup.cfg that don't work unless "use minimal checkers" is set to false.

@karthiknadig
Copy link
Member

We added code to detect .pylintrc, but not pyproject.toml or setup.cfg. This require loading the file and paring it to see if there are any pylint settings.

@karthiknadig
Copy link
Member

karthiknadig commented Aug 13, 2020

The plan is to remove pylint minimal checkers when we have this #11995. Closing this issue, since this will be addressed as a part of enabling #11995.

@jacquespeeters
Copy link

jacquespeeters commented Oct 8, 2021

Any news on this?

Still trouble using flake8 config from pyproject.toml
I see this MR #13321 but looks related to pylinkt and not flake8

Members of my team say it is working fine and to switch to pycharm...

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-linting bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants