diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1a960699..9051e5c5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -86,17 +86,6 @@ repos: - id: isort name: isort (python) -# Python: Flake8 (checks only, does this support auto-fixes?) -#- repo: https://github.com/PyCQA/flake8 -# rev: 4.0.1 -# hooks: -# - id: flake8 -# additional_dependencies: &flake8_dependencies -# - flake8-bugbear -# - pep8-naming -# exclude: ^(docs/.*|tools/.*)$ -# Alternatively: use autopep8? - # Python Formatting - repo: https://github.com/psf/black rev: 23.9.1 # Keep in sync with blacken-docs @@ -110,6 +99,17 @@ repos: - black==23.9.1 # keep in sync with black hook # TODO: black-jupyter +# Python: Flake8 (only for pyflake) +- repo: https://github.com/PyCQA/flake8 + rev: 6.1.0 + hooks: + - id: flake8 + additional_dependencies: &flake8_dependencies + - flake8-bugbear + - Flake8-pyproject +# exclude: ^(docs/.*|tools/.*)$ +# Alternatively: use autopep8? + # Jupyter Notebooks: clean up all cell outputs - repo: https://github.com/roy-ht/pre-commit-jupyter rev: v1.2.1 diff --git a/pyproject.toml b/pyproject.toml index d7096f82..c12f083e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,3 +5,8 @@ requires = [ "cmake>=3.20.0,<4.0.0" ] build-backend = "setuptools.build_meta" + + +[tool.flake8] +#ignore = ['E231', 'E241'] +select = ['F']