How to show pylint message codes in VScode?

Viewed 315

Anyone know how to show pylint message code in the problem section?

python linting example

It only shows descriptions, not the codes like F821 and E0601.

3 Answers

type this command in vscode terminal

pylint FILENAME

Pylint is a Python static code analysis tool that can find programming errors, help implement coding standards, and provide simple refactoring suggestions.

It usually does not display the code containing the error on the terminal, but displays the type and suggestion of the error, and displays the precise location of the error code in the terminal with numbers. (For example: [49,7], line 49, 7th)

For "print(jfile)", Pylint can only recognize that "jfile" is an undefined variable. The error here is that it needs to be defined.

For "jfile = "hello" print jfile ", Pylint will recognize that "jfile" is a string. The error here is that it needs to use "print(jfile)" to output using python3: ("pylint" will give code output suggestions here)

enter image description here

Related