Repository navigation
[isort] Expand I001 documentation - #29843
Merged
Merged
Conversation
ntBre
reviewed
Nov 2, 2026
ntBre
left a comment
Contributor
There was a problem hiding this comment.
Thanks, this looks good to me overall. I just had a few suggestions.
halcyon-past
force-pushed
the
expand-i001-docs
branch
from
November 3, 2026 12:59
ad8cedd to
30ebafc
Compare
Expands the documentation for `unsorted-imports` (`I001`) to explain the default import sections, section separation, module sorting within sections, and blank line requirements after import blocks before top-level definitions vs. statements. Also adds links to the relevant `isort` settings, the FAQ for import categorization, and external references (PEP 8, isort). Closes astral-sh#27232. Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
halcyon-past
force-pushed
the
expand-i001-docs
branch
from
November 3, 2026 13:01
30ebafc to
1bc8eab
Compare
Author
|
Thanks for the review @ntBre! I've addressed all your suggestions, formatted the docs examples, and updated the PR. Could you take another look when you get a chance? |
ntBre
approved these changes
Nov 3, 2026
ntBre
left a comment
Contributor
There was a problem hiding this comment.
Thanks! I pushed a couple of final wording tweaks, but this looks good to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expands the documentation for
unsorted-imports(I001) to explain:future,standard-library,third-party,first-party,local-folder) with a link to the categorization FAQ.lint.isort.lines-after-imports.isortsettings documentation section.isortdocumentation.Closes #27232.
Test Plan
cargo dev generate-docsanduv run scripts/check_docs_formatted.pyto confirm all docs snippets are formatted correctly.cargo dev generate-all --mode checkto confirm generated schemas/docs consistency.cargo test -p ruff_linter -- rules::isort(all 172 tests passed).CARGO_BUILD_WARNINGS=deny cargo clippy -p ruff_linter(passed with 0 warnings).uv run --only-dev --locked prek run --files crates/ruff_linter/src/rules/isort/rules/organize_imports.rs(all hooks passed).Co-authored-by: Brent Westbrook brentrwestbrook@gmail.com