Closed alex closed 10 years ago
The issue is specifically with application-import-names
.
Here's a more minimal reproducer:
$ cat t.py
from cryptography import CMAC
from .backends import DummyCMACBackend
$ cat tox.ini
[flake8]
application-import-names = cryptography
$ flake8 --select='I' t.py
t.py:3:1: I100 Imports statements are in the wrong order. from backends should be before from cryptography
Should the correct order be
from . import N
from .. import M
from .X import N
from ..X import M
from .Y import N
from ..Y import M
or
from . import N
from .X import N
from .Y import N
from .. import M
from ..X import M
from ..Y import M
?
The latter, but no newline.
Good that's much easier to implement :)
The following code:
Results in the following warnings: