Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code - Can you have real-time linting for python?

There is the same exact question here, but there hasn't been any replies.

Real-time linting of Python with VSCode

I'm using the Python extension right now that is on the VS code marketplace.

After about an hour of research, I found the following option in the linter:

python.linting.lintOnSave

I set it to false, but that just pretty much just disables linting. There has to be a way if auto complete works in real-time.

Is it possible to have linting done in real-time in VS code? As of right now, the linting only works when I save. Am I missing something?

like image 415
Noctsol Avatar asked Dec 03 '18 16:12

Noctsol


People also ask

Is Visual Studio Code good for Python?

Working with Python in Visual Studio Code, using the Microsoft Python extension, is simple, fun, and productive. The extension makes VS Code an excellent Python editor, and works on any operating system with a variety of Python interpreters.


1 Answers

Please a have look at this post. There was already a feature called lintOnTextChange, but it is deprecated now. You have to extend your config file with the following lines to get it work on text change:

"python.linting.lintOnSave": true,
"files.autoSave": true

But this is more a workaround, instead of a proper solution for your problem. Also have a look at this.

like image 81
Habebit Avatar answered Oct 25 '22 20:10

Habebit