Skip to content

Tooling

The template configures are the tooling necessary for a modern Python project.

These include:

  • EditorConfig maintain consistent coding styles for multiple developers.
  • Black the uncompromising code formatter.
  • isort sort imports alphabetically, and automatically separated into sections and by type.
  • flake8 check coding style (PEP8), programming errors and cyclomatic complexity.
  • pydocstyle static analysis tool for checking compliance with Python docstring conventions.
  • MyPy static type checker for Python.
  • Coverage measure code coverage of Python programs.
  • bandit security linter from PyCQA.
  • pre-commit framework for managing and maintaining pre-commit hooks.

Pre commits

The pre-commits configuration is defined in .pre-commit-config.yaml, and includes the most important checks and auto-fix to perform.

If one of the pre-commits fails, the commit is aborted avoiding distraction errors.

Info

The pre-commits are also run in the CI/CD as part of the Test Suite. This helps guaranteeing the all the contributors are respecting the code conventions in the pull requests.