Switch ruff isort to one-import-per-line style#223
Merged
Conversation
The I rule was already enabled, but with combine-as-imports and default type-grouping. Switch to force-single-line and order-by-type=false to match the prior reorder-python-imports behaviour used across the other repos. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
One-time mechanical reformat from switching to force-single-line. No logic changes — only splitting combined imports onto separate lines. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
le-utils already enabled ruff's
Iimport rules during its uv migration, but withcombine-as-importsand default type-grouping — combined imports, CapWords-first. This switches isort toforce-single-lineandorder-by-type = falseso it matches the priorreorder_python_importsone-per-line, case-insensitive style used across the other LE repos.Three commits: the config change, a mechanical one-time reformat (3 files,
ruff check --fix), and a.git-blame-ignore-revsentry for the reformat.References
None — no tracking issue. Part of a cross-repo pass aligning import-ordering style after the uv migrations.
Reviewer guidance
The reformat commit is purely mechanical — review the config commit for intent. The reformat is excluded from
git blamevia.git-blame-ignore-revs. Verify withruff check --select I .(clean on the branch).Each reformat diff was scanned for semantic import-order changes; none were found in this repo.
AI usage
Used Claude Code to identify the style divergence from the other repos, derive the ruff isort config that reproduces the old
reorder_python_importsbehaviour, and apply it. The reformat diff was reviewed before committing.