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-374
$ spack install py-flake8 ^python@3.7.4
Ü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 = py37, py38, flake8, docs
[testenv:flake8]
basepython = python
deps =
flake8
flake8-isort
commands =
flake8 src tests setup.py conftest.py docs/conf.py