flake8#
flake8 stellt sicher, dass euer Code
größtenteils PEP 8 folgt. Eine automatische Formatierung, z.B. mit Black, ist jedoch noch komfortabler. Zudem prüft
flake8 auf nicht verwendete Importe.
Installation#
$ spack env activate python-311
$ spack install py-flake8
Überprüfen#
$ flake8 path/to/your/code
flake8 kann für tox konfiguriert werden in der
tox.ini-Datei eines Pakets, z.B.:
[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