Closed adrianandreias closed 9 years ago
Previously we handled relative imports incorrectly. I've improved this behaviour but a side effect of that is that it now expects a new line between the absolute application imports and the relative ones.
Arguably this behaviour is undesirable though so I can probably be convinced to make it ignore that situation.
Any opinions @alex?
Hi,
I don't see this rule here: https://google-styleguide.googlecode.com/svn/trunk/pyguide.html?showone=Imports_formatting#Imports_formatting
And I never heard about separate groups for absolute imports and relative imports, just stdlib import group, 3rd parties group and local group. And with absolute imports first in each group and relative imports last in each group.
I would be fine with disabling that warning entirely in Google mode :)
PEP8 also doen't talk about separate groups for absolute and relative imports: http://legacy.python.org/dev/peps/pep-0008/#imports
but just for the stdlib, 3rd party and local, just like Google guidelines.
Is there a way I can disable this behavior or you mean a new release is needed for this?
Thanks ;)
I do a separate group for relative and absolute, so this is fine with me :-)
On Wed, Nov 5, 2014, 9:48 AM Adrian Andreias notifications@github.com wrote:
PEP8 also doen't talk about separate groups for absolute and relative imports: http://legacy.python.org/dev/peps/pep-0008/#imports
but just for the stdlib, 3rd party and local, just like Google guidelines.
Is there a way I can disable this behavior or you mean a new release is needed for this?
Thanks ;)
— Reply to this email directly or view it on GitHub https://github.com/public/flake8-import-order/issues/24#issuecomment-61801936 .
@adrianandreias You can easily exclude the the I201 error entirely in flake8. Just add --exclude=I201
to your command, or add it to setup.cfg or tox.ini.
Yes, but then I'll no longer have validation against the 3 PEP8 defined import groups: stdlib, 3rd party and local.
Yes, but then I'll no longer have validation against the 3 PEP8 defined import groups: stdlib, 3rd party and local.
:+1:
Yeah, I'm stuck with an older version to overcome this. I still don't understand why @public and @alex are using a standard of their own. Standard that is not specified in PEP8 nor in Google standards.
Perhaps this could be overcome by having more fine-grained configuration options... that way, people can use their own standards by diverging from the default.
On pyca/cryptography we wanted to avoid ambiguity in the ordering so we extended it ourselves. I would like to have a more compatible mode in this though.
After updating to 2014-10-29 version I started getting lots of:
For absolute imports followed by relative imports:
I have these settings defined in tox.ini:
Anyone else getting changed behavior with the 2014-10-29 release?