diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7013228..add4ea6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,6 +13,12 @@ repos: - id: isort name: isort (python) + - repo: https://github.com/pycqa/flake8 + rev: 6.0.0 + hooks: + - id: flake8 + additional_dependencies: [Flake8-pyproject] + - repo: https://github.com/markdownlint/markdownlint rev: v0.12.0 hooks: diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 72666e7..53fcb03 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -69,12 +69,13 @@ python3 -m pip install -e .[dev] The BDFR project uses several tools to manage the code of the project. These include: - [black](https://github.com/psf/black) +- [flake8](https://github.com/john-hen/Flake8-pyproject) - [isort](https://github.com/PyCQA/isort) - [markdownlint (mdl)](https://github.com/markdownlint/markdownlint) - [tox](https://tox.wiki/en/latest/) - [pre-commit](https://github.com/pre-commit/pre-commit) -The first three tools are formatters. These change the code to the standards expected for the BDFR project. The configuration details for these tools are contained in the [pyproject.toml](../pyproject.toml) file for the project. +The first four tools are formatters. These change the code to the standards expected for the BDFR project. The configuration details for these tools are contained in the [pyproject.toml](../pyproject.toml) file for the project. The tool `tox` is used to run tests and tools on demand and has the following environments: diff --git a/pyproject.toml b/pyproject.toml index a8b0dd2..4a28a8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,7 @@ data-files = {"config" = ["bdfr/default_config.cfg",]} [project.optional-dependencies] dev = [ "black>=22.10.0", + "Flake8-pyproject>=1.2.2", "isort>=5.10.1", "pre-commit>=2.20.0", "pytest>=7.1.0",