Pylint It's a python Syntax detector , While improving programming efficiency, the fancy warnings it brings are also really uncomfortable , Like this colorful wavy line below :
These warnings are extremely diverse , Like the following :
Method 'forward' is abstract in class 'torch.nn.modules.module' but is not
overriddenPylint(W0223:abstract-method)
Formatting a regular string which could be a
f-stringPylint(C0209:consider-using-f-string)
Unused import torchPylint(W0611:unused-import)
Missing function or method docstringPylint(C0116:missing-function-docstring)
......
How to eliminate these warnings ?
1, If installed pylint plug-in unit
The operation is as follows :
stay VSCode Click in turn File -> Preferences -> Settings , Then click in the upper right corner Open Setting(JSON)
, In open json Add the following statement to the file :
"pylint.args": ["--errors-only"]
2, If used python Self contained lint
Add in the same position as above :
"python.linting.pylintArgs": ["--errors-only"]
Technology
Daily Recommendation