Oryon
Oryon

Reputation: 127

How to disable instant linting from [Python (parser)] in Visual Studio Code

The Python parser in Visual Studio Code 1.25.1 lints any error directly while typing.

How can I turn that off?

I would like to disable the live-parser-linting. I do not want to completely disable linting from pep8 or pylint too.

Maybe the issue got adressed here too: https://github.com/Microsoft/vscode-python/issues/2270

I found a setting for "List of surpressed diagnostic message" but I do not know, what to insert here (or if this is even the right place) nor do I find any documentation for the python.analysis.disabled settings on the web.

Help appreciated.

"python.analysis.disabled": [
    "",
],

Is there any workaround?

Upvotes: 3

Views: 3160

Answers (1)

Brett Cannon
Brett Cannon

Reputation: 15990

[I am assuming you have the latest version of the Python extension for VS code installed as this won't have anything directly to do with VS Code 1.25.1]

If you are using the new language server from the Python extension then errors as you type do not turn off at the moment (you referenced the specific issue suggesting having a setting to turn that off).

If you're not using the new language server than the extension only runs linters on save, which would mean you have automatic saving as you type turned on and that's triggering the constant linting of your code. Tweak your settings to not automatically save and that will stop constant linting (and you can specify settings in VS Code for specific languages if you only want to change this for Python).

Upvotes: 2

Related Questions