-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
] Omit trailing whitespace in unsorted-imports
(I001
)
#15518
Conversation
Questions:
|
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
I001 | 10 | 5 | 5 | 0 | 0 |
Linter (preview)
ℹ️ ecosystem check detected linter changes. (+5 -5 violations, +0 -0 fixes in 1 projects; 54 projects unchanged)
bokeh/bokeh (+5 -5 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --no-fix --output-format concise --preview --select ALL
- examples/server/app/gapminder/data.py:5:1: I001 [*] Import block is un-sorted or un-formatted + examples/server/app/gapminder/data.py:5:5: I001 [*] Import block is un-sorted or un-formatted - src/bokeh/model/model.py:46:1: I001 [*] Import block is un-sorted or un-formatted + src/bokeh/model/model.py:46:5: I001 [*] Import block is un-sorted or un-formatted - src/bokeh/model/util.py:167:1: I001 [*] Import block is un-sorted or un-formatted + src/bokeh/model/util.py:167:5: I001 [*] Import block is un-sorted or un-formatted - src/bokeh/server/connection.py:28:1: I001 [*] Import block is un-sorted or un-formatted + src/bokeh/server/connection.py:28:5: I001 [*] Import block is un-sorted or un-formatted - tests/test_cross.py:34:1: I001 [*] Import block is un-sorted or un-formatted + tests/test_cross.py:34:5: I001 [*] Import block is un-sorted or un-formatted
Changes by rule (1 rules affected)
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
I001 | 10 | 5 | 5 | 0 | 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
I kind of liked that the old range included the entire line instead of just the expression range. It would be nice if we can preserve that behavior
Summary
The fix range for sorting imports accounts for trailing whitespace, but we should only show the trimmed range to the user when displaying the diagnostic. So this PR changes the diagnostic range.
Closes #15504
Test Plan
Reviewed snapshot changes