Skip to content

Commit 849326f

Browse files
authored
chore: add flake8-typing-imports (#3203)
1 parent 96abff1 commit 849326f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.pre-commit-config.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ repos:
2222
args: [--ignore-words-list=ser]
2323
exclude: ^docs/api-completeness.md$
2424
- repo: https://github.com/pycqa/flake8
25-
rev: '7.3.0' # todo: remove once https://github.com/astral-sh/ruff/issues/458 is addressed
25+
rev: '7.3.0'
2626
hooks:
2727
- id: flake8
28-
additional_dependencies: [darglint==1.8.1, Flake8-pyproject]
28+
# TODO(unassigned): replace with ruff once https://github.com/astral-sh/ruff/issues/458 is addressed.
29+
name: darglint
30+
alias: darglint
2931
entry: flake8 --select DAR --ignore DAR101,DAR201,DAR401,DAR402
3032
exclude: |
3133
(?x)^(
@@ -39,6 +41,15 @@ repos:
3941
# Soft-deprecated, so less crucial to document so carefully
4042
narwhals/stable/v1/.*
4143
)$
44+
# Keep in sync with `flake8-typing-imports` so the same venv is reused.
45+
additional_dependencies: [darglint==1.8.1, flake8-typing-imports==1.17.0]
46+
- id: flake8
47+
# TODO(unassigned): replace with ruff once https://github.com/astral-sh/ruff/issues/2302 is addressed.
48+
name: flake8-typing-imports
49+
alias: flake8-typing-imports
50+
entry: flake8 --select TYP --min-python-version=3.9.0
51+
# Keep in sync with `darglint` so the same venv is reused.
52+
additional_dependencies: [darglint==1.8.1, flake8-typing-imports==1.17.0]
4253
- repo: local
4354
hooks:
4455
- id: check-api-reference

0 commit comments

Comments
 (0)