Python Linter Comparison 2022: Pylint vs Pyflakes vs Flake8 vs autopep8 vs Bandit vs Prospector vs Pylama vs Pyroma vs Black vs Mypy vs Radon vs mccabe

This page summarizes the projects mentioned and recommended in the original post on /r/Python

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • ruff

    An extremely fast Python linter and code formatter, written in Rust.

  • How did this miss Ruff? It’s a clone of flake8 plus the usual extensions (bugbear, pep8naming, McCabe, pydocstyle), but runs significantly faster.

  • flake8-async

    Highly opinionated linter for Trio code

  • And OK, I realise that this isn't everyone's experience, but when I find bugs at work I often try to extend the linter so they can't come back. https://github.com/Zac-HD/flake8-trio is probably the most dramatic case of that, but there are many others, and I'm willing to pay a bit of latency to make that dev cycle fast.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • shed

    `shed` canonicalises Python code. Shed your legacy, stop bikeshedding, and move on. Black++

  • https://github.com/Zac-HD/shed expresses this philosophy, by wrapping most of the fixers I like (including pyupgrade, and a fair bit of extra custom logic too).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts