question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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:

https://github.com/Microsoft/vscode-python/issues/3292 https://github.com/Microsoft/vscode-python/issues/4873

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
pzelnipcommented, Apr 6, 2019

Makes sense, thanks for following up!

0reactions
DonJayamannecommented, Apr 5, 2019

And sorry about the confusion

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linting Python in Visual Studio Code
The Select Linter command adds "python.linting. ... If you're using a global environment and VS Code is not running elevated, linter installation may...
Read more >
Can't fully disable python linting Pylance VSCODE
I do understand that the "yellow highlights" do not affect the execution of the code. They are, though, quick annoying to constantly see...
Read more >
Starting New Python Project in VSCode | Yury Zhauniarovich
When I was looking information about language server protocol (LSP), ... flake8Enabled to true ; and disable pylint: set python.linting.
Read more >
Pylint 2.16.0-dev documentation
The latest version supports Python 3.7.2 and above. Pylint analyses your code without actually running it. It checks for errors, enforces a coding...
Read more >
Advanced Visual Studio Code for Python Developers
Customize your user interface; Run and monitor Python tests; Lint and format your ... language server extension for Python on Visual Studio Code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found