Repository navigation
style: establish the production Ruff baseline - #170
Merged
Merged
Conversation
Resolve existing lint and formatting debt in production code, scripts, and tests before enabling the required gate. Preserve executable behavior, learner files, runtime text, and generated documentation outputs. Refs #132.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
This was referenced Nov 5, 2026
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
Clear the existing production lint and formatting debt tracked in #132 before #127 enables required Ruff checks. Format production code, scripts, and tests, remove two unused imports and one unused test binding, and add missing file-location comments. Learner exercises, checks, solutions, and manifests are unchanged.
Runtime strings and executable syntax were compared before and after, allowing import layout, the documented unused bindings, and docstrings. The docs generator's source table is identical; replaying the committed reference extracts regenerated all 31 topics, index, and license byte-identically.
Closes #132. Prerequisite for #127 and #124.
Tests
Ruff 0.16.4, using the proposed configuration from #127 saved as
/tmp/pythonlings-continue.2mi7__50/lint-config/pyproject.toml:ruff check --config /tmp/pythonlings-continue.2mi7__50/lint-config/pyproject.toml --exclude tests/fixtures pythonlings scripts tests: all checks passed (178 violations before cleanup).ruff format --config /tmp/pythonlings-continue.2mi7__50/lint-config/pyproject.toml --exclude tests/fixtures --check --quiet pythonlings scripts tests: passed.python -m pytest -q: 253 passed in 37.02s, including CLI and TUI coverage.pythonlings --root tests/fixtures/passing_curriculum verify: passed.python -m pytest tests/unit/test_docs.py -q: 5 passed.python -m build --no-isolation --outdir /tmp/pythonlings-continue.2mi7__50/style-dist: source and wheel builds passed. The existing Hatchling installation was used because isolated dependency installation stalled earlier in this session.python -m pip install --no-deps --force-reinstall /tmp/pythonlings-continue.2mi7__50/style-dist/pythonlings-0.4.4-py3-none-any.whlin the temporary wheel environment. From/tmp,python -m pythonlings --versionreported 0.4.4 and passing-curriculum verification passed.git diff --check: passed.Local platform: Linux, Python 3.13.13. Hosted CI must pass at the reviewed head before squash merge.
Screenshots
Current Textual pilot capture at 130 x 36; rendered PNG was visually inspected. Formatting preserves runtime text and presentation.
Checklist
python -m pytest -qReviewed head:
cc7ccd0834e25471806db5e9fc0fe255f52282f6. CI run 41990569978: all eight matrix jobs passed. No unresolved review feedback.