Skip to content

lint: resolve pre-existing Ruff violations in scripts/, tests/, and pythonlings/ #132

Closed

Description

@Huoyanlifusu

Problem

With the Ruff checks added in #127 (advisory for now), the non-curriculum code reports 176 pre-existing violations:

Scope Count
scripts/ 38
tests/ (integration, unit, tui) 77
pythonlings/ (core, cli, screens, widgets) 61

Breakdown: 164 × E501 (line too long), 10 × I001 (unsorted imports), 2 × F401 (unused imports) — 12 auto-fixable. All reported by:

ruff check scripts tests pythonlings --ignore F821

These stay unfixed today, so when #124 flips lint from advisory to blocking, CI goes red immediately.

Proposed Behavior

  • Run ruff check scripts tests pythonlings --fix + ruff format for the auto-fixable subset.
  • Hand-fix the rest (long strings/comments that format can't touch).
  • Land as one or two focused PRs targeting dev (e.g. one for tests/, one for scripts/ + pythonlings/), each keeping CI green and tests passing (python -m pytest -q).
  • Acceptance: the command above reports 0 errors.
  • checks/ (curriculum) stays out of scope — separate discussion.

Alternatives Considered

Activity

  1. added
    enhancement
    on Aug 24, 2026
  2. abhiksark commented on Nov 5, 2026

    @abhiksark
    Owner

    Completed in #170 on dev (075fdb59b4950908b0ec93367ae3d8dfb4def642). Ruff 0.16.4 reports zero lint errors and no formatting differences for pythonlings/, scripts/, and tests/ outside intentionally invalid fixtures. The prior 178 violations are resolved. All 253 tests, passing-curriculum verification, packaging and installed-wheel checks, documentation output equivalence, and all eight hosted CI jobs passed. Curriculum sources are unchanged.

  3. added a commit that references this issue on Nov 5, 2026
    075fdb5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions