Fix pre-commit configuration (#9748)

* Fix flake8 pre-commit hook to run on pyi files too

* Fix pycln pre-commit hook
   * Run on pyi files too
   * Remove `stubs stdlib tests scripts` in args to avoid running pycln on files twice
This commit is contained in:
Jonathan Plasse
2023-02-18 15:13:14 +01:00
committed by GitHub
parent 5ebf892d07
commit 0bb7d621d3

View File

@@ -14,7 +14,9 @@ repos:
rev: v2.1.3 # must match requirements-tests.txt
hooks:
- id: pycln
args: [--config=pyproject.toml, stubs, stdlib, tests, scripts]
args: [--config=pyproject.toml]
types: [file]
types_or: [python, pyi]
- repo: https://github.com/psf/black
rev: 23.1.0 # must match requirements-tests.txt
hooks:
@@ -33,6 +35,8 @@ repos:
- "flake8-bugbear==23.1.20" # must match requirements-tests.txt
- "flake8-noqa==1.3.0" # must match requirements-tests.txt
- "flake8-pyi==23.1.2" # must match requirements-tests.txt
types: [file]
types_or: [python, pyi]
ci:
autofix_commit_msg: "[pre-commit.ci] auto fixes from pre-commit.com hooks"