New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WSP318 conflict with isort I001 and E128 #933
Comments
@tbrlpld thanks for raising this! I guess, we should update the docs of That's how it works. And it is 100% compatible. All our code is checked for it. Example:
Considering your exact situation: from flask import (
Blueprint,
current_app,
flash,
g,
redirect,
render_template,
request, url_for,
) Would you like to update the docs with the link to the correct That's how it should be: """
...
This rule is also compatible with ``isort`` multiline output.
You should set ``multi_line_output = 3`` setting.
See also:
https://github.com/timothycrosley/isort#multi-line-output-modes
""" |
Great, thank you for the clarification. Is there a way to make this the standard configuration through `wemake_python_styleguide`?
I am definitely happy to update the docs to make it clear for other users!
… On Oct 22, 2019, at 22:34, Nikita Sobolev ***@***.***> wrote:
@tbrlpld thanks for raising this!
I guess, we should update the docs of WSP318 to link the isort multiline mode, so it would be clear for future users.
That's how it works. isort has multiple modes for multiline output. Our preferred mode is 3: https://github.com/wemake-services/wemake-python-styleguide/blob/master/setup.cfg#L71
And it is 100% compatible. All our code is checked for it. Example: https://github.com/wemake-services/wemake-python-styleguide/blob/8488835f167bf17a614df583736ea5dd7778af1e/wemake_python_styleguide/visitors/ast/blocks.py#L5
Considering your exact situation:
from flask import (
Blueprint,
current_app,
flash,
g,
redirect,
render_template,
request, url_for,
)
Would you like to update the docs with the link to the correct multiline_output_mode?
That's how it should be:
"""
...
This rule is also compatible with ``isort`` multiline output.
You should set ``multi_line_output = 3`` setting.
See also:
https://github.com/timothycrosley/isort#multi-line-output-modes
"""
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Yes, we enforce the same configuration for everyone via Assigned you on this task, thanks a lot! |
Ok, i'll update the documentation. I also found a broken link, that is supposed to point to the |
When running
The same warnings repeat over and over. Am I doing something wrong? Update: After letting the process go for a while, it ends with a Traceback:
Is this the expected behavior? |
Bug report
What's wrong
There is no way of formatting a multi-line import without violating either WSP318 or I001 and E128.
Does not yield I001 and also not E128, but it does violate WSP318.
Fixing it so WSP318 is not violated creates violations against I001 and E128.
How is that should be
WSP318 should respect visual indent (E128) and isort order (I001).
System information
Love the opinionated linting though ❤️ Just found it here! Awesome project. Definitely takes some useless thinking away from me.
The text was updated successfully, but these errors were encountered: