From c4bece2f5844e41e4771c7a95b857474ac0ab030 Mon Sep 17 00:00:00 2001 From: OMEGARAZER <869111+OMEGARAZER@users.noreply.github.com> Date: Sat, 31 Dec 2022 09:09:48 -0500 Subject: [PATCH] Add flake8 to precommit adds flake8 to pre-commit and dev requirements. --- .pre-commit-config.yaml | 6 ++++++ docs/CONTRIBUTING.md | 3 ++- pyproject.toml | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) 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",