Skip to content

Switch ruff isort to one-import-per-line style#223

Merged
bjester merged 3 commits into
mainfrom
enable-ruff-isort
Jun 11, 2026
Merged

Switch ruff isort to one-import-per-line style#223
bjester merged 3 commits into
mainfrom
enable-ruff-isort

Conversation

@rtibbles

Copy link
Copy Markdown
Member

Summary

le-utils already enabled ruff's I import rules during its uv migration, but with combine-as-imports and default type-grouping — combined imports, CapWords-first. This switches isort to force-single-line and order-by-type = false so it matches the prior reorder_python_imports one-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-revs entry 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 blame via .git-blame-ignore-revs. Verify with ruff 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_imports behaviour, and apply it. The reformat diff was reviewed before committing.

rtibbles and others added 3 commits June 11, 2026 15:34
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>
@rtibbles rtibbles marked this pull request as ready for review June 11, 2026 22:53

@bjester bjester left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bjester bjester merged commit 61c4d56 into main Jun 11, 2026
21 checks passed
@bjester bjester deleted the enable-ruff-isort branch June 11, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants