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.

Look into deprecating `python.linting.enabled`

See original GitHub issue

I’m getting behavior very similar to #12285. Basically new language server, same old bug.

Environment data

  • VS Code version: 1.56.2
  • Extension version: v2021.5.842923320
  • OS and version: Microsoft Windows 10 2004 [Version 10.0.19041.985]
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): venv
  • Relevant/affected Python packages and their versions: N/A
  • Relevant/affected Python-related VS Code extensions and their versions: Pylance v2021.5.3
  • Value of the python.languageServer setting: Default

Expected behaviour

Prompting to install Pylint

Actual behaviour

There is no response and no output in Python window.

If pylint is installed, it only works from command line, but doesn’t lint errors in VSCode.

Steps to reproduce:

  • Pylint is not installed.
  • Open folder in VSCode
  • Add file test.py (and typed incorrect code to check linter works)
  • Ctrl + Shift + P for command palette
  • Run Python: Run Linting

Steps to mitigate

  • Uninstalled Python extension.
  • Removed all Python related settings.
  • Removed all data from ItemTable under key ms-python.python from state.vscdb
  • Restarted VSCode
  • Reinstalled the latest Python extension.

Same results.

Logs

There is no output in Python window.

Workaround

When I add the following line to settings.json (Workspace or global)

"python.linting.pylintEnabled": true,

Everything seems to work again. And Pylint related lines show up in the Output window as expected. It is strange why it works, because that should be the default value, and you shouldn’t need to explicitly set it.

Similar issues

Seems like it might be connected with #16150 and/or #16084

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
gharrygcommented, Jun 24, 2021

I thought I was going crazy trying to get pylint working. As stated in the original description, it seems like I can only get pylint working when I add "python.linting.pylintEnabled": true, to my user settings (even though the default value already shows to be true).

2reactions
luabudcommented, Feb 16, 2022

@karthiknadig has a a prototype for linting using pylint over Language Server Protocol. The idea is that we would deprecate the python.linting.enabled setting, and linting would be enabled/disabled by enabling/disabling linting extensions. If you want to try out the prototype for pylint, we’d love to hear your feedback. Instructions here: https://github.com/PyCQA/pylint/issues/5796#issue-1133069729

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linting Python in Visual Studio Code
To enable linters, open the Command Palette (Ctrl+Shift+P) and select the Python: Select Linter command. The Select Linter command adds "python.linting.<linter> ...
Read more >
Linting Python in Visual Studio Code | by Yashshavi Kashyap
You can easily enable and disable all linting by using the Python: Enable Linting command. You will get to know more about this...
Read more >
VSCode: Linting not working on Python 2.7 - Stack Overflow
My linter just stopped working on VSCode around the time I installed ... pylintUseMinimalCheckers": true, "python.linting.enabled": true, ...
Read more >
Closure Linter | PyCharm Documentation - JetBrains
Before you start · Download and install Python as described on the Python official website. · Install and enable the Closure Linter plugin...
Read more >
VSCode and Pylint configuration - MicroPython-Stubber!
Pylance supercharges your Python IntelliSense experience with rich type information, helping you write ... Specifies whether to enable linting in general.
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