Skip to content

Commit

Permalink
CI: Add pyflakes
Browse files Browse the repository at this point in the history
This adds `pyflakes` for code linting in pre-commits.

This is performed via `flake8 --select=F`, skipping all other stylistic
checks of flake8 (which we perform with other tools such as black
and isort). Also, `flake8` supports `...  # noqa` annotations to
silence warnings from `pyflakes`.
  • Loading branch information
ax3l committed Oct 18, 2023
1 parent 21ccdf9 commit fc5f837
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ 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
# 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?

Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ requires = [
"cmake>=3.20.0,<4.0.0"
]
build-backend = "setuptools.build_meta"


[tool.flake8]
#ignore = ['E231', 'E241']
select = ['F']

0 comments on commit fc5f837

Please sign in to comment.