mirror of
https://github.com/reconurge/flowsint.git
synced 2026-11-08 14:35:41 -06:00
One tool instead of three, one config instead of four duplicated blocks. black/isort/flake8 dropped from every package's dev deps, ruff added once; .flake8 deleted, [tool.black]/[tool.isort] blocks deleted from all 4 sub-package pyproject.toml files. Config lives once, at the workspace root: ruff walks up from any file it's checking until it finds a pyproject.toml with a [tool.ruff] table (verified empirically — a package's own pyproject.toml lacking that table doesn't stop the search), so the root-level [tool.ruff] applies to all four packages without duplication. That's the one real win over the old per-package black/isort blocks, which had to be copy-pasted four times and kept in sync by hand. Same rule surface as before, not more: select = E/F/W/I (pycodestyle + pyflakes + isort-equivalent), matching exactly what flake8 checked. ruff has other rule groups (UP/pyupgrade, B/bugbear) that would surface real things — deliberately left off. Turning those on finds new debt and is a separate decision with its own diff to review, not a side effect of swapping the tool underneath an unchanged rule set. Same E501 exclusion carried over too, same reasoning: the formatter is the sole authority on line length. known-first-party carries over unchanged (same isort concern this repo already fixed once — see "app" vs "flowsint_api" in the ratchet history) and the wildcard-import per-file-ignore for flowsint_core/__init__.py still applies, verified directly. Six files reformatted by `ruff format` where it disagreed with black on edge cases (import grouping, ternary line-breaking, blank lines after a class statement) — all cosmetic, no behavior change, reviewed diff by diff. One real ruff-check finding (an import block ruff's isort-equivalent wanted sorted differently) — took ruff check --fix. Verified: `make lint` clean, `make test` green (all 4 packages), lint-staged tested with a real staged-file run (not just config inspection) to confirm `uv run ruff format` / `uv run ruff check --fix` actually execute, mypy ratchet target unaffected (still fires on its own pre-existing backlog, unrelated to this change).