Problem
Style rules are currently enforced by hand during review. For example, #121 was asked to re-wrap lines to 80 chars and add the file-location comment (# checks/async/async7.py) after the fact — things a linter could catch before a maintainer spends time on the PR.
Current state
- No
ruff/black/flake8/isort config, no .editorconfig, no .pre-commit-config.yaml.
pyproject.toml has no [tool.ruff] section.
- CI (
ci.yml) runs pytest, the passing-curriculum verify, and python -m build — but no lint step.
Proposal
Add ruff as the single linter and formatter, configured for the repo's existing Google-Python-style / 80-character convention:
[tool.ruff] with line-length = 80
ruff check and ruff format --check as a CI job
- ruff added to the
dev dependency group
- optionally a
.pre-commit-config.yaml for local hooks
Questions for maintainer
- OK to standardize on ruff (instead of flake8 + black)?
- Should the
# checks/<topic>/<file>.py file-location comment also get an automated check, or just be documented in CONTRIBUTING.md?
Acceptance criteria
Problem
Style rules are currently enforced by hand during review. For example, #121 was asked to re-wrap lines to 80 chars and add the file-location comment (
# checks/async/async7.py) after the fact — things a linter could catch before a maintainer spends time on the PR.Current state
ruff/black/flake8/isortconfig, no.editorconfig, no.pre-commit-config.yaml.pyproject.tomlhas no[tool.ruff]section.ci.yml) runspytest, the passing-curriculumverify, andpython -m build— but no lint step.Proposal
Add
ruffas the single linter and formatter, configured for the repo's existing Google-Python-style / 80-character convention:[tool.ruff]withline-length = 80ruff checkandruff format --checkas a CI jobdevdependency group.pre-commit-config.yamlfor local hooksQuestions for maintainer
# checks/<topic>/<file>.pyfile-location comment also get an automated check, or just be documented inCONTRIBUTING.md?Acceptance criteria
CONTRIBUTING.mdexplains how to run lint locally.