Skip to content

CI: add ruff lint check #71

Description

@turbomam

CI currently runs codespell and pytest but no linter. The repo already lists ruff in the tests extra but never invokes it.

Running uv run ruff check on main finds 101 violations:

Rule Count Auto-fixable
F401 unused-import 40 yes
I001 unsorted-imports 18 yes
E501 line-too-long 18 no
F841 unused-variable 11 no
F821 undefined-name 4 no
F811 redefined-while-unused 4 yes
F541 f-string-missing-placeholders 4 yes
F402 import-shadowed-by-loop-var 2 no

56 are auto-fixable (ruff check --fix).

Suggested CI step (add after the codespell step in main.yaml):

- name: Lint with ruff
  run: uv run ruff check

A companion PR should bulk-fix the 56 auto-fixable violations and address the remaining 45 manually. The F821 (undefined-name) errors should be treated as bugs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions