-
Notifications
You must be signed in to change notification settings - Fork 926
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: split
ignored if in trailing comment
#11776
Comments
- Remove now-invalid noqa from pyslip - Fix noqa in bootstrap.py - Fix extra F403 wildcard imports - Fix isinstance checks - Fix E402 instances - Fix "# isort: split" for ruff bug astral-sh/ruff#11776
- Remove now-invalid noqa from pyslip - Fix noqa in bootstrap.py - Fix extra F403 wildcard imports - Fix isinstance checks - Fix E402 instances - Fix "# isort: split" for ruff bug astral-sh/ruff#11776
I find it a bit confusing. How should the |
I'm tempted to call this unsupported. Do you have a use-case for the inline split? |
It's effectively treated as import x
import y
# isort: split
import f
# isort: split
import a
import b This is explicitly documented in isort: https://pycqa.github.io/isort/docs/configuration/action_comments.html#isort-split
We've used this in the past for cases where upstream dependencies have not handled arbitrary-import-order very well, and so a specific import needs to be "First". We can work around by using normal split/on/off features. Perhaps the fact that we're the only ones to notice this in so long is perhaps evidence that supporting it isn't very important. |
I am not sure if this is 100% related, but we also ran in to differences with trailing from x import a # isort: split
from x import b While ruff 0.4.8 changes it to: from x import a # isort: split
from x import b When running
|
Yeah I think we just don't really support inline |
test.py:
isort is a noop:
ruff ignores the marker:
The text was updated successfully, but these errors were encountered: