Skip to content

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

Closed

Description

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

Activity

  1. added
    triage-neededNeeds assignment to the proper sub-team
    bugIssue identified by VS Code Team member as probable bug
    on Aug 6, 2020
  2. changed the title [-]Vscode does not honor pylint config file under default settings[/-] [+]Vscode does not honor pylint pyproject.toml file under default settings[/+] on Aug 10, 2020
  3. 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[/+] on Aug 10, 2020
  4. karthiknadig commented on Aug 10, 2020

    @karthiknadig
    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.

  5. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Aug 10, 2020
  6. danrneal commented on Aug 11, 2020

    @danrneal
    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.

  7. karthiknadig commented on Aug 13, 2020

    @karthiknadig
    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.

  8. karthiknadig commented on Aug 13, 2020

    @karthiknadig
    Member

    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.

  9. jacquespeeters commented on Oct 8, 2021

    @jacquespeeters

    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...

  10. locked as resolved and limited conversation to collaborators on Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-lintingbugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions