flake8
#
flake8 ensures that most of your code
follows PEP 8. However, automatic formatting, for example with Black,
is even more convenient. In addition flake8
also checks for unused imports.
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