Skip to content

ci: add automated style linting (ruff) so style issues are caught before review #124

Closed

Description

@Huoyanlifusu

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

  • Lint/format runs in CI and fails the build on style violations.
  • Config matches the documented 80-char / Google Python style.
  • CONTRIBUTING.md explains how to run lint locally.

Activity

  1. added
    area: core
    documentation
    size: M
    on Aug 20, 2026
  2. self-assigned this
    on Aug 20, 2026
  3. abhiksark commented on Aug 20, 2026

    @abhiksark
    Owner

    Hi @Huoyanlifusu
    Will you take this?

    I can take this as well.

  4. Huoyanlifusu commented on Aug 20, 2026

    @Huoyanlifusu
    ContributorAuthor

    Hey @abhiksark , I'd like to adpot this task.

  5. added a commit that references this issue on Nov 5, 2026
    0e922cc
  6. abhiksark commented on Nov 5, 2026

    @abhiksark
    Owner

    Completed in dev by squash commit 0e922cc5f8914960b7883e2d456425a777e122f6, incorporating approved #127 after the #170 baseline cleanup. Ruff lint and format failures now fail CI; production code, scripts, and tests are covered, while intentionally incomplete curriculum and invalid fixtures are excluded. All nine PR checks passed and a deliberate production violation proved both commands fail correctly. The GitHub merge API lacked workflow scope, so the identical reviewed tree was squash-committed and pushed through SSH; #127 is closed as incorporated. Curriculum style work remains open in #133.

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

Metadata

Metadata

Assignees

Labels

area: coredocumentationsize: M

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions