diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f1fafd20..5525d71d7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,6 +17,7 @@ repos: rev: v3.0.1 hooks: - id: reorder-python-imports + exclude: ^testing/resources/python3_hooks_repo/ args: [--py37-plus, --add-import, 'from __future__ import annotations'] - repo: https://github.com/asottile/add-trailing-comma rev: v2.2.1 @@ -41,3 +42,4 @@ repos: hooks: - id: mypy additional_dependencies: [types-all] + exclude: ^testing/resources/ diff --git a/testing/resources/python3_hooks_repo/py3_hook.py b/testing/resources/python3_hooks_repo/py3_hook.py index fd64ce8dd..8c9cda4c6 100644 --- a/testing/resources/python3_hooks_repo/py3_hook.py +++ b/testing/resources/python3_hooks_repo/py3_hook.py @@ -1,5 +1,3 @@ -from __future__ import annotations - import sys diff --git a/testing/resources/python3_hooks_repo/setup.py b/testing/resources/python3_hooks_repo/setup.py index 49e1e2cc7..9125dc1df 100644 --- a/testing/resources/python3_hooks_repo/setup.py +++ b/testing/resources/python3_hooks_repo/setup.py @@ -1,5 +1,3 @@ -from __future__ import annotations - from setuptools import setup setup(