- pyproject.toml: pin tool.ruff.lint select to [E4, E7, E9, F, I] explicitly,
BEFORE running any autofix. Without an explicit select, an unpinned
'ruff>=0.1.0' silently picks up its current default rule set, which now
includes plugin categories (datetimez, simplify, pyupgrade, bugbear, etc.)
never intended by this repo's ignore list (which only ever suppressed
E402/F841). This made 'ruff check' in CI fail with thousands of findings
unrelated to any recent change.
- ruff check --fix: sort/organize imports across src/ and tests/ (103 files),
scoped strictly to E4/E7/E9/F/I — purely mechanical import reordering.
No pyupgrade (Optional[X] -> X | None) or RUF (f-string conversion,
__all__ sorting) rewrites, since those categories were never selected.
Verified: ruff check clean, black --check clean (no drift found on main),
full unit suite (321 tests) passes unchanged.
Problem
ruff check on main reports thousands of findings — reproduced on a clean checkout, pre-existing drift, not caused by any recent PR.
Root cause: pyproject.toml declares ruff>=0.1.0 (unpinned) with a [tool.ruff.lint] ignore list but no explicit select. The ignore list (E402, F841) only makes sense for the classic pyflakes/pycodestyle set — without a pinned select, newer ruff resolves its own broader default, pulling in categories (datetimez, simplify, pyupgrade, bugbear...) never intended by this repo, on top of never-enforced import-sort (I001) findings across the codebase.
Fix
Verification
Purely mechanical import-sort — no behavioral or type-annotation changes.