diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c1d393f56c..89f7caada8 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/bad.py + exclude: doc/data/messages/(r/reimported|w/wrong-import-order)/bad.py - repo: https://github.com/psf/black rev: 22.3.0 hooks: diff --git a/doc/data/messages/w/wrong-import-order/bad.py b/doc/data/messages/w/wrong-import-order/bad.py new file mode 100644 index 0000000000..3301d81079 --- /dev/null +++ b/doc/data/messages/w/wrong-import-order/bad.py @@ -0,0 +1,4 @@ +import os +from . import utils +import pylint # [wrong-import-order] +import sys # [wrong-import-order] diff --git a/doc/data/messages/w/wrong-import-order/good.py b/doc/data/messages/w/wrong-import-order/good.py new file mode 100644 index 0000000000..853f8ffb7a --- /dev/null +++ b/doc/data/messages/w/wrong-import-order/good.py @@ -0,0 +1,6 @@ +import os +import sys + +import pylint + +from . import utils