Skip to content
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

isort not behaving as expected with vertical hanging indents for multi line output #2385

Open
funmathis opened this issue Mar 6, 2025 · 0 comments

Comments

@funmathis
Copy link

We have an .isort.cfg file that looks like this.

[settings]
profile=black
default_section=THIRDPARTY
ensure_newline_before_comments=True
filter_files=True
force_grid_wrap=0
include_trailing_comma=True
order_by_type=False
skip=settings,stages
use_parentheses=True

This should take import statements that are over 100 characters (including spaces) and create a vertical hanging indent for the import statement. However, when we use hanging indents, isort is changing them to single line imports that are over 100 characters. We are also using black with the same settings, so it then reverts the changes. This has led to an infinite loop of isort and black fighting one another. Our short term fix is to turn off some of the isort checks and rely on black to do the vertical hanging indent work, but it would be great if isort behaved as expected.

We're using isort==5.11.5. Please disregard if this is fixed in 6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant