-
Notifications
You must be signed in to change notification settings - Fork 959
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
Collapse short multi-line import groups to one line with I001 #6288
Comments
I believe we collapse such imports if you disable I've looked into this before, and isort's documentation states that this setting is enabled for |
It works for me (isort 5.12.0). $ cat > a.py
from typing import (
Any,
Callable,
)
$ isort --profile=black a.py
Fixing /tmp/a.py
$ cat a.py
from typing import Any, Callable |
What I meant is that: the isort documentation suggests that it shouldn't be removing magic trailing commas there. The documentation says that |
To be clear: we support this behavior, it's just not our default. |
Got it. Feel free to close if you think this should remain as is. I guess this is a duplicate of |
I'm torn on it but I'm going to leave as-is for now. |
Ruff, like upstream isort, expands single-line import groups that are too long to multiple lines.
Upstream isort, but not Ruff, also does the reverse: it collapses multi-line import groups that are short enough to a single line. I think we should do this too.
The text was updated successfully, but these errors were encountered: