Skip to content

Language Server breaks Pylint as Linter When python.linting.pylintEnabled not specified #5119

@pzelnip

Description

@pzelnip

Environment data

  • VS Code version: 1.33.0
  • Extension version (available under the Extensions sidebar): 2019.3.6352
  • OS and version: OSX 10.12.6 (Sierra)
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6 and 3.7, installed via homebrew
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv
  • Relevant/affected Python packages and their versions: pylint (all versions I tried)

Expected behaviour

When setting "python.jediEnabled": false and "python.linting.pylintEnabled" left as the default value (which is true), I'd expect Pylint warnings to show up in the problems view.

Actual behaviour

When jediEnabled is false, and python.linting.pylintEnabled is not in my workspace settings (relying on the default), then I get Linter pylint is installed but not enabled. on startup and no pylint warning show up in the problems view. Screenshot:

Screen Shot 2019-04-04 at 4 19 53 PM

If I explicitly set python.linting.pylintEnabled to true in my workspace settings, then I get Pylint warnings in my problems view. Screenshot of these settings in effect:

Screen Shot 2019-04-04 at 4 21 15 PM

Steps to reproduce:

  1. In workspace settings set jediEnabled to false, and python.linting.pylintEnabled to the default value (ie if it's in workspace settings, remove it and ensure it's not in user settings
  2. Open up a Python source file that should trigger some Pylint warnings
  3. Restart VS Code
  4. On startup you get Linter pylint is installed but not enabled. and no pylint warnings in the problems view
  5. Now add python.linting.pylintEnabled: true to workspace settings & restart.
  6. Pylint now works as expected.

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

Starting Microsoft Python language server.
[Info  - 4:13:33 p.m.] GetCurrentSearchPaths /Users/username/.virtualenvs/projectname/bin/python 
[Info  - 4:13:33 p.m.] Python search paths:
[Info  - 4:13:33 p.m.]     /private/var/folders/z9/c2zmn4_13b31g4y26q30n5c1x5hbyk/T/fhmfrc0v.5to
[Info  - 4:13:33 p.m.]     /Users/username/.virtualenvs/projectname/lib/python3.6
[Info  - 4:13:33 p.m.]     /Users/username/.virtualenvs/projectname/lib/python3.6/lib-dynload
[Info  - 4:13:33 p.m.]     /usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6
[Info  - 4:13:33 p.m.]     /Users/username/.virtualenvs/projectname/lib/python3.6/site-packages
[Info  - 4:13:33 p.m.]     /Users/username/.virtualenvs/projectname/lib/python3.6/site-packages/newrelic-2.68.0.50
[Info  - 4:13:33 p.m.] Configuration search paths:
[Info  - 4:13:33 p.m.]     /Users/username/.virtualenvs/projectname/lib/python36.zip
[Info  - 4:13:33 p.m.]     /Users/username/.virtualenvs/projectname/lib/python3.6
[Info  - 4:13:33 p.m.]     /Users/username/.virtualenvs/projectname/lib/python3.6/lib-dynload
[Info  - 4:13:33 p.m.]     /usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6
[Info  - 4:13:33 p.m.]     /Users/username/.virtualenvs/projectname/lib/python3.6/site-packages
[Info  - 4:13:33 p.m.]     /Users/username/.virtualenvs/projectname/lib/python3.6/site-packages/newrelic-2.68.0.50
[Info  - 4:13:33 p.m.]     /Users/username/.virtualenvs/projectname/bin
[Info  - 4:13:34 p.m.] Microsoft Python Language Server version 0.2.43.0
[Info  - 4:13:34 p.m.] Initializing for /Users/username/.virtualenvs/projectname/bin/python

Workaround:

Explicitly set python.linting.pylintEnabled: true in your workspace settings.

Similar issues:

#3292
#4873

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions