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.

Pylint not working when language server is on

See original GitHub issue

Environment data

  • VS Code version: 1.38.0
  • Extension version (available under the Extensions sidebar): 2019.9.34911
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): venv
  • Relevant/affected Python packages and their versions: pylint 2.3.1,
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info #3977): Language Server

Expected behaviour

Having linting, pylint and LS enabled in user settings should provide linting messages from both pylint and the LS.

Actual behaviour

Only LS is displaying linting messages. In order to get pylint to work, the workaround is to explicitly enable it in the workspace settings.

Steps to reproduce:

Enable pylint in the user settings, and make sure linting and the LS are enabled. Write a piece of code wrongly and notice that only the LS will display linting messages. We’d expect pylint to work as well.

cc @Anapo14

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
darrickyeecommented, Sep 25, 2019

I am not sure what is meant by “this is how it has always worked”? As I understand it, the issue is that in the VSCode settings, the “Python > Linting: Pylint Enabled” checkbox is checked by default, but pylint is not actually enabled. So there is a discrepancy between what the Settings page shows and what the actual state of the settings is

Additionally, unchecking and re-checking the checkbox does not enable pylint (python.linting.pylintEnabled entry is deleted from settings.json when it is checked), so there is no way to enable pylint via the settings GUI. It seems the only way to enable it is to “manually” edit the settings.json file. I don’t think this is what the behavior was in previous versions?

1reaction
karthiknadigcommented, Sep 21, 2021

Verified fixed in main.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linting Python in Visual Studio Code
Linting highlights syntactical and stylistic problems in your Python source code, which often helps you identify and correct subtle programming errors or ...
Read more >
VSCode and Pylint configuration - MicroPython-Stubber!
Open your VSCode settings file : .vscode/settings.json. change the language server to Pylance ➡ "python.languageServer": "Pylance",.
Read more >
Pylance Now Default Language Server for Python in Visual ...
Pylance is now the default language server for Python in Visual Studio Code, providing IntelliSense functionality as of the May 2021 release ...
Read more >
VS Code - pylint is not running - Stack Overflow
Uninstall Python Extension · Reinstall Python Extension · And with that there will will be one more extension of "Python Extension" named -...
Read more >
Python in Visual Studio Code - September 2022 Release
Much like the others, this new extension uses the Language Server ... and errors thrown by flake8 and pylint in VS Code's problems...
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