Skip to content

style: establish the production Ruff baseline - #170

Merged
abhiksark merged 1 commit into
devfrom
fix/production-style-baseline
Nov 5, 2026
Merged

abhiksark merged 1 commit into
devfrom
fix/production-style-baseline

Conversation

@abhiksark

@abhiksark abhiksark commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

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.
  • Installed the wheel with python -m pip install --no-deps --force-reinstall /tmp/pythonlings-continue.2mi7__50/style-dist/pythonlings-0.4.4-py3-none-any.whl in the temporary wheel environment. From /tmp, python -m pythonlings --version reported 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.

Current exercise editor after production style cleanup

Checklist

  • Updated docs when behavior changed (generated output is byte-identical)
  • Added or updated tests (formatting only; existing tests pass)
  • Verified python -m pytest -q

Reviewed head: cc7ccd0834e25471806db5e9fc0fe255f52282f6. CI run 41990569978: all eight matrix jobs passed. No unresolved review feedback.

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.
@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: de7b490a-b328-46a5-b323-93f82d7af076

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant