diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d45cda6984..134e22a453 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: rev: 5.10.1 hooks: - id: isort - exclude: doc/data/messages/(r/reimported|w/wrong-import-order|u/ungrouped-imports)/bad.py + exclude: doc/data/messages/(r/reimported|w/wrong-import-order|u/ungrouped-imports|m/misplaced-future)/bad.py - repo: https://github.com/psf/black rev: 22.3.0 hooks: diff --git a/doc/data/messages/m/misplaced-future/bad.py b/doc/data/messages/m/misplaced-future/bad.py new file mode 100644 index 0000000000..1fa872f396 --- /dev/null +++ b/doc/data/messages/m/misplaced-future/bad.py @@ -0,0 +1,3 @@ +import sys + +from __future__ import print_function # [misplaced-future] diff --git a/doc/data/messages/m/misplaced-future/good.py b/doc/data/messages/m/misplaced-future/good.py new file mode 100644 index 0000000000..0124db53e6 --- /dev/null +++ b/doc/data/messages/m/misplaced-future/good.py @@ -0,0 +1,3 @@ +from __future__ import print_function + +import sys