One ruff rule set, defined in pyproject and used by CI - #7
Merged
Conversation
CI ran `--isolated --select E4,E7,E9,F`, so the config file could never be the definition: a bare `ruff check` reported 41 findings under ruff 0.16.6's defaults while CI passed clean. The config now selects E4/E7/E9/F plus I, UP and B, and CI runs the plain command. The wider default set is not adopted. S102 and BLE001 fire on deliberate choices here - `exec` rebuilds a student's saved component, and a broad `except` is what keeps one wrong component from ending their session. Twenty findings were mechanical: `typing.Callable` to `collections.abc`, unquoted self-references, import order. Four needed a decision. Three zips get `strict=True`; the one over `names` and `stages` in `checks.py` is the reason the rule earns its place, since a stage added without a name would otherwise have been skipped in silence.
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.
CI ran
ruff check --isolated --select E4,E7,E9,F, so the config file could never be the definition. A bareuv run ruff check src testsreported 41 findings under ruff 0.16.6's defaults while CI passed clean - two commands answering different questions.[tool.ruff.lint] selectnow names E4/E7/E9/F plus I, UP and B, and CI runs the plain command against it.The wider default set is deliberately not adopted:
S102andBLE001fire on choices this package makes on purpose -execrebuilds a student's saved component, and a broadexceptis what keeps one wrong component from ending their session.Of the 18 findings the new set produced, 14 were auto-fixed (
typing.Callabletocollections.abc, unquoted self-references, import order) and 4 were decided by hand: threezipcalls takestrict=True, and one unused loop variable is renamed. Thezip(names, stages)inchecks.pyis the one that earns the rule - a stage added without a matching name would have been skipped silently.