Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code: Tell pylint to ignore the next line?

Looking for a way to tell pylint to ignore the error on the next line. The method for JavaScript is given here, just

// @ts-ignore

I tried some logical variants of that for Python, but didn't succeed.

like image 728
Eric Auld Avatar asked Jul 15 '18 19:07

Eric Auld


People also ask

How do you get Pylint to ignore a line?

you can ignore it by adding a comment in the format # pylint: disable=[problem-code] at the end of the line where [problem-code] is the value inside pylint(...) in the pylint message – for example, abstract-class-instantiated for the problem report listed above.

How do you silence Pylint?

This may be done by adding # pylint: disable=some-message,another-one at the desired block level or at the end of the desired line of code.

How do I disable VSCode Pylint warnings?

Go to the menu File -> Preferences -> Settings (Or open directly with Command + , or Ctrl + , ). Then in the search box at the top of the window, search for pylint Args . Click on the button Add item and add the line --disable=W .


1 Answers

You can use # pylint: disable=fixme, line-too-long. See this StackOverflow answer.

like image 150
itaintme Avatar answered Sep 28 '22 09:09

itaintme