Problem
checks/ currently reports ~1374 violations under Ruff, but 1162 of them are F821 (undefined-name) — which is just how the checks work: they reference names the learner hasn't defined yet, and the runner's shared-namespace mechanism resolves them at runtime. So that count is mostly noise.
The rest is roughly 212 real-ish ones:
- 159 × E501 (long lines)
- 18 × E712 (comparing with
== True etc.)
- 13 × E402 (imports not at top)
- 11 × I001 (unsorted imports)
- ~11 others
But these files are part of the curriculum: they're mirrored with exercises/ and solutions/ and get copied into learner workspaces. I don't want to reformat them blindly and end up with noisy diffs or confusing changes for learners.
Proposed Behavior
Before doing anything, I'd like to agree on the policy. My suggestion:
- Per-file-ignore F821 for
checks/** (it's expected, not a bug):
[tool.ruff.lint.per-file-ignores]
"checks/**/*.py" = ["F821"]
- Leave the remaining ~212 alone for now and decide later whether they're worth fixing (probably yes, but as its own pass, keeping the exercise/check/solution mirrors in sync).
Alternatives Considered
Problem
checks/currently reports ~1374 violations under Ruff, but 1162 of them are F821 (undefined-name) — which is just how the checks work: they reference names the learner hasn't defined yet, and the runner's shared-namespace mechanism resolves them at runtime. So that count is mostly noise.The rest is roughly 212 real-ish ones:
== Trueetc.)But these files are part of the curriculum: they're mirrored with
exercises/andsolutions/and get copied into learner workspaces. I don't want to reformat them blindly and end up with noisy diffs or confusing changes for learners.Proposed Behavior
Before doing anything, I'd like to agree on the policy. My suggestion:
checks/**(it's expected, not a bug):Alternatives Considered
checks/— not possible for F821, and risky for the rest.checks/from Ruff entirely — simplest, but we'd lose visibility into genuinely fixable stuff.