Code Quality Tools in Python

This page summarizes the projects mentioned and recommended in the original post on dev.to

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

    Simple Python style checker in one Python file

  • Linters analyze code to detect various categories of issues like logistical issue and stylistic issues. Some popular linters are Pylint, pycodestyle, Flake8 and Pylama.

  • pyflakes

    A simple program which checks Python source files for errors

  • Flake8: a combination of following linters: PyFlakes, pycodestyle, Ned Batchelder’s McCabe script

  • 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
  • mccabe

    McCabe complexity checker for Python

  • Flake8: a combination of following linters: PyFlakes, pycodestyle, Ned Batchelder’s McCabe script

  • pylama

    Code audit tool for python.

  • Linters analyze code to detect various categories of issues like logistical issue and stylistic issues. Some popular linters are Pylint, pycodestyle, Flake8 and Pylama.

  • pydocstyle

    Discontinued docstring style checker

  • pydocstyle

  • black

    The uncompromising Python code formatter

  • as per the black's documentation, Black is "The uncompromising Python code formatter". It is my personal favourite because it has minimal configuration and is fast enough. Black is used by some very popular open-source projects, such as pytest, tox, Pyramid, Django Channels, Poetry, and so on. Example usage:

  • yapf

    A formatter for Python files

  • YAPF (Yet Another Python Formatter) is Google's official python formatter which follows google's style guide. The documentation is easy to understand the installation and configuration for this formatter.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • isort

    A Python utility / library to sort imports.

  • Formatters automatically format your code based on a style guide. Some popular formatters are Black, YAPF, autopep8 and isort.

  • autopep8

    A tool that automatically formats Python code to conform to the PEP 8 style guide.

  • autopep8 is an unofficial, yet popular, tool that automatically formates Python code to conform to PEP 8. It uses pycodestyle, Python’s official PEP-8 violation checker tool, to determine what parts of the code need to be formatted.

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