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

Long imports and noqa #2291

Open
matan1008 opened this issue Sep 13, 2024 · 0 comments
Open

Long imports and noqa #2291

matan1008 opened this issue Sep 13, 2024 · 0 comments

Comments

@matan1008
Copy link

matan1008 commented Sep 13, 2024

Hola,
I have an import from the following format:

from aaaaaaa import bbbbbbbbbbbbbbbbb, ccccccccccccccccccc, dddddddddddddddd  # noqa: E402
from aaaaaaa import eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, fffffffffffffffffffff  # noqa: E402

When running isort . -m HANGING_INDENT -l 120 --check-only --combine-as --df it prints:

-from aaaaaaa import bbbbbbbbbbbbbbbbb, ccccccccccccccccccc, dddddddddddddddd  # noqa: E402
-from aaaaaaa import eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, fffffffffffffffffffff  # noqa: E402
+from aaaaaaa import bbbbbbbbbbbbbbbbb, ccccccccccccccccccc, dddddddddddddddd, eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, \
+    fffffffffffffffffffff  # noqa: E402

Running isort . -m HANGING_INDENT -l 120 --check-only --combine-as --df again, it prints:

-from aaaaaaa import bbbbbbbbbbbbbbbbb, ccccccccccccccccccc, dddddddddddddddd, eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, \
-    fffffffffffffffffffff  # noqa: E402
+from aaaaaaa import fffffffffffffffffffff  # noqa: E402
+from aaaaaaa import bbbbbbbbbbbbbbbbb, ccccccccccccccccccc, dddddddddddddddd, eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

Besides of the strange behavior that yields two different formattings, the second one missing the noqa.

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