Skip to content

Using Pylint to Enforce Standards

What Pylint is good at

  • naming conventions
  • missing docstrings
  • too many branches/arguments
  • potential errors

Example run

pylint your_package
pylint your_package

Typical config (pyproject.toml)

tool.pylint."MESSAGES CONTROL"
disable = ["C0114", "C0115", "C0116"]
 
[tool.pylint.format]
max-line-length = 88
tool.pylint."MESSAGES CONTROL"
disable = ["C0114", "C0115", "C0116"]
 
[tool.pylint.format]
max-line-length = 88

How to read Pylint output

  • CC convention
  • WW warning
  • EE error
  • RR refactor

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 coffee

Was this page helpful?

Let us know how we did