Closed pgjones closed 6 years ago
This looks really good @pgjones, thanks for taking the time to look into it!
I'm afraid there's still one example that's not covered under this implementation:
from a_repo import settings
from .exceptions import AnError
from .a_module import MyClass
from ..base import BaseClass
The empty line between the imports is still causing an I202, even though the following entry is in our setup.cfg
and from a_repo
imports should(?) be considered to be in the same group as relative (from .
) imports:
[flake8]
application-import-names = a_repo
Edit: I'm more than happy to fix this myself if you don't mind an extra PR by the way.
@pkatseas I think this then represents the actual edited style, can you take a look at the complete example and note if any of it is not the edited style?
@pkatseas Is this style correct now?
This is brilliant, thanks @pgjones. It works as expected
This is specifically helpful to allow the edited style to have an optional newline between
import
andform X import
lines without triggering a I202 error.In a more general sense this should allow for more advanced styles.