style(lint): re-tighten E741/E731 and drop tests F401 exemption (follow-up to #17) - #18
Merged
Merged
Conversation
…ow-up to #17) PR #17 relaxed the ruff config broadly to unblock CI. This narrows the relaxation to what the codebase actually needs: - pyproject: ignore only E701/E702 (250+ legacy one-line multiple statements, cosmetic); remove E741/E731/E501 from ignore (E501 was never active under the pinned select anyway) and drop the tests/* F401 per-file exemption - fix all 22 E741 sites (rename ambiguous `l` to line/link/node) - fix the single E731 site (lambda -> def in test_existence_filter) - clean 24 unused imports across codewiki/ and tests/ (F401) - drop 2 unused local variables (F841) in analysis.py / smoke_test_mcp.py Full suite: 430 passed, 2 skipped. Touched files are clean under the tightened config; remaining repo-wide violations (E701/E702/E402/etc.) are untouched legacy counts.
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
Follow-up to #17: narrows the lint relaxation to what the codebase actually needs.
pyproject.toml: keep onlyE701/E702in ignore (250+ legacy one-line multiple statements, cosmetic); re-enableE741/E731and drop thetests/* F401per-file exemption.E501removed from ignore — it was never active under the pinnedselect.E741sites (rename ambiguousl→line/link/node)E731site (lambda→defintest_existence_filter)codewiki/andtests/(F401)F841) inanalysis.py/smoke_test_mcp.pyscripts/_tmp2.py(accidentally committed in 99e4c44) — it was also the trigger of the ruff formatter panic that forced fix(ci): relax ruff rules and fix test flakes #17 to drop the format CI stepTest plan
pytest -o addopts="" tests/ -q)ruff checkclean on all touched files under the tightened configE741/E731now report zero repo-wide; formatter panic gone after_tmp2.pyremoval (format-check restoration tracked separately)