Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Tips and Traps¶
Optional Pylint checkers in the extensions module
Message Control¶
Show ERROR messages only.
:::bash pylint -E some_script.pyShow ERROR and WARNING messages only.
:::bash pylint --disable=R,C some_script.pyDisable warning associated with a specific line.
:::bash proc = sp.run(cmd, shell=True) # pylint: disable=W1510
Configuration¶
It is suggessted that you configure pylint using pyproject.toml.
Below is an example.
[tool.pylint.master]
unsafe-load-any-extension=no
extension-pkg-whitelist=numpy,cv2
[tool.pylint.typecheck]
ignored-classes=Fysom,MyClassSimilar Lines¶
Similar lines detection has a high chance of yielding false positives.
It is suggested that you either set min-similarity-lines to a large value
or disable check of similar lines.
Please refer to the issue
The duplicate-code (R0801) can’t be disabled
for more discussions.
[tool.pylint.similarities]
min-similarity-lines=11
ignore-docstrings=yes
ignore-comments=yes
ignore-imports=yesExamples¶
Please refer to settings.json for an example of pylint configuration for Visual Studio Code.
References¶
https://
https://