List of common python linter checks to disable
Pylint
Pylint is a static code analysis tool for Python that helps identify programming errors, enforce a coding standard, and look for code smells. It evaluates Python code for various issues, such as:
- Syntax errors
- Undefined variables
- Unused imports
- Code style violations
- Complexity metrics
Annoying pylint error
Despite pylint enforces many useful requirements some of them are not practical and I would like to provide you a list of pylint errors/warnings that annoy you and you may suppress them:
Convention Errors (C)
- C0103:
invalid-name
– Invalid name - C0114:
missing-module-docstring
– Missing module docstring - C0116:
missing-function-docstring
– Missing function or method docstring - C0123:
use-dict-key
– Use of a dict key - C0301:
line-too-long
– Line too long - C0302:
too-many-lines
– Too many lines in module - C0411:
wrong-import-order
– Wrong import order
Error Codes (E)
- E1121:
too-many-function-args
– Too many positional arguments
Refactor Codes (R)
- R0904:
too-many-public-methods
– Too many public methods - R0911:
too-many-return-statements
– Too many return statements - R0912:
too-many-branches
– Too many branches - R0913:
too-many-arguments
– Too many arguments - R0914:
too-many-locals
– Too many local variables - R0915:
too-many-statements
– Too many statements - R1702:
too-many-nested-blocks
– Too many nested blocks - R1705:
no-else-return
– No nested block
Warning Codes (W)
- W0212:
protected-access
– Access to a protected member - W0718:
comparison-to-none
– Comparison to None should be 'if cond is None:' - W0719:
no-exception-type
– No exception type(s) specified
Convention (C)
- C0325:
unnecessary-parens
– Unnecessary parens after 'if' keyword
lint
python
Software and digital electronics / IT
Posted by admin
2024-10-22 12:07
add comment