diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 44b8398f..740dc6b7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,5 +19,9 @@ repos: hooks: - id: pyupgrade args: ["--py37-plus"] +- repo: https://github.com/pycqa/flake8 + rev: 5.0.4 # 6.0.0 requires Python 3.8 + hooks: + - id: flake8 exclude: doc/ext/sphinxarg diff --git a/setup.cfg b/setup.cfg index 2a9acf13..ec274ee3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,13 @@ [bdist_wheel] universal = 1 + +[flake8] +max_line_length = 100 +# E402: module level import not at top of file +# E203: whitespace before ':' (black / flake8 disagreement) +# W503: line break before binary operator (black / flake8 disagreement) +ignore=E203,W503 +# E402: module level import not at top of file +# F405: may be undefined, or defined from star imports +# F403: from .manager import *' used; unable to detect undefined names +per-file-ignores = */__init__.py: F405,F403,E402