flake8

flake8 is a wrapper around PyFlakes, pycodestyle and McCabe. However, automatic formatting, for example with Black, is even more convenient.

Installation

$ spack env activate python-311
$ spack install py-flake8

Check

$ flake8 PATH/TO/YOUR/CODE

Configuration

flake8 can be configured for tox in the tox.ini file of a package, for example:

[tox]
envlist = py38, py311, flake8, docs

[testenv:flake8]
basepython = python
deps =
    flake8
    flake8-isort
commands =
    flake8 src tests setup.py conftest.py docs/conf.py