Conversation
Introduces Ruff (run via uvx, pinned) as the Python counterpart to the existing Prettier/svelte-check tooling on the web side — dev/CI only, so repo-intel stays stdlib-only and single-file. Adds ruff.toml, make py-lint/py-format/py-format-check targets, and a CI lint gate. Fixes the two real findings: build.py now names which placeholder is missing (was an unused loop var), and collect_local uses contextlib.suppress instead of try/except/pass. E402 is per-file-ignored for repo-intel.py, whose HELP constant intentionally precedes imports.
Applies ruff format (Black-style, 100-col) across repo-intel.py, gen_techdata.py, and build.py, and adds the py-format-check gate to CI alongside the lint gate. Mostly joins lines that now fit and normalizes slice spacing; gen_techdata.py's curated maps expand to one entry per line, which is more diff-friendly when languages/frameworks change.
`make check` runs all static gates locally (Prettier, Ruff lint + format, svelte-check), mirroring CI. `make format` now also runs ruff format so a single command formats the whole repo.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThis PR introduces Python code quality infrastructure via Ruff linting and formatting, refactors existing Python files for compliance, improves build error messaging, and updates developer documentation to reflect the new tooling workflow. ChangesPython Code Quality Tooling Setup
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Adds Ruff as the Python counterpart to the existing Prettier/svelte-check tooling on the web side. Dev/CI only — Ruff never ships, so
repo-intelstays stdlib-only and single-file.What's here
ruff.toml— line-length 100 (matches Prettier's printWidth), rulesE,F,W,I,B,UP,SIM,C4.E501ignored (the formatter owns width).E402per-file-ignored forrepo-intel.py, whoseHELPconstant intentionally precedes imports.make py-lint/py-format/py-format-check;make checkruns all static gates (Prettier + Ruff + svelte-check);make formatnow formats Python too. Ruff runs viauvx ruff@0.14.5(pinned, nothing installed or committed).setup-uvpluspy-lintandpy-format-checkgates, alongside the existing Prettier check.make format/make checkand refreshes the component-structure table.Code changes
build.pynow names which placeholder is missing (was an unused loop var), andcollect_localusescontextlib.suppressinstead oftry/except/pass.ruff formatapplied acrossrepo-intel.py,gen_techdata.py,build.py— mostly line-joins and slice spacing;gen_techdata.py's curated maps expand to one entry per line (more diff-friendly when languages/frameworks change).Notes
dist/repo-intelrebuilt by the pre-commit hook; the CI staleness gate passes.Test plan
make checkgreen (Prettier, Ruff lint + format, svelte-check)make buildproduces nodist/repo-inteldiff (CI staleness gate)uvx ruff@0.14.5 check .andformat --check .cleanSummary by CodeRabbit
Chores
Documentation