.. SPDX-FileCopyrightText: 2021 Veit Schiele .. .. SPDX-License-Identifier: BSD-3-Clause ``flake8`` ========== `flake8 `_ is a wrapper around `PyFlakes `_, `pycodestyle `_ and `McCabe `_. However, automatic formatting, for example with :doc:`black`, is even more convenient. Installation ------------ .. code-block:: console $ spack env activate python-311 $ spack install py-flake8 Check ----- :samp:`$ flake8 {PATH/TO/YOUR/CODE}` Configuration ------------- ``flake8`` can be configured for :doc:`python-basics:test/tox` in the ``tox.ini`` file of a package, for example: .. code-block:: ini [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 .. seealso:: * `Configuring flake8 `_ * `flake8 error/violation codes `_ * `pycodestyle error codes `_