Using Pylint to Enforce Standards
What Pylint is good at
- naming conventions
- missing docstrings
- too many branches/arguments
- potential errors
Example run
pylint your_packagepylint your_packageTypical config (pyproject.toml)
tool.pylint."MESSAGES CONTROL"
disable = ["C0114", "C0115", "C0116"]
[tool.pylint.format]
max-line-length = 88tool.pylint."MESSAGES CONTROL"
disable = ["C0114", "C0115", "C0116"]
[tool.pylint.format]
max-line-length = 88How to read Pylint output
CCconventionWWwarningEEerrorRRrefactor
Tip
Donβt enable every rule at once in a legacy project.
Adopt gradually.
If this helped you, consider buying me a coffee β
Buy me a coffeeWas this page helpful?
Let us know how we did
