Skip to content

Lint the tests, and fail CI on ruff errors - #2940

Merged
pvcraven merged 3 commits into
developmentfrom
ci/blocking-ruff
Oct 7, 2026
Merged

pvcraven merged 3 commits into
developmentfrom
ci/blocking-ruff

Conversation

@pvcraven

@pvcraven pvcraven commented Oct 7, 2026

Copy link
Copy Markdown
Member

Summary

CI now lints the tests, and ruff errors fail the "Code Inspections" check.

Why both

Every code quality step in code_quality.yml (ruff format, ruff check, mypy, pyright) had continue-on-error: true. Their errors showed in the log, but the check always passed. That's how 29 lint errors, 15 files with unsorted imports, and 2 unformatted files got into development. The latest run's log shows them while reporting success. So linting tests would only have added lines to a log nobody reads.

Commit 1: fix the existing errors

Fixed with ruff 0.15.20, the version uv.lock pins for CI. I had 0.14.9 locally, which treats a few rules differently.

  • 28 long lines: all docstring prose in arcade/input/manager.py and arcade/application.py. I reflowed whole paragraphs rather than splitting single lines. Lists and directives are untouched, and Args: continuations are indented under their entries so Sphinx keeps them with the argument.
  • arcade/cli/__init__.py: the re-export of run_arcade_cli is now declared in __all__ (F401).
  • Import order: sorted with ruff in arcade (15 files) and tests (92 files). arcade/__init__.py stays excluded, as the config already says.
  • Formatting: tests/integration/test_ubo_stress.py and tests/unit/rendering/image_compare.py.

The full suite passes (1732), and every arcade subpackage still imports after the reordering.

Commit 2: lint tests, and make ruff blocking

  • pyproject.toml: removed "tests" from lint.exclude.
  • make.py: ruff-check and the import order check now run on arcade and tests. That's RUFF_PATHS, which replaces RUFFOPTS_PACKAGE.
  • code_quality.yml:
    • The formatting and linting steps no longer have continue-on-error, so ruff errors fail the check.
    • The later steps use if: ${{ !cancelled() }} instead of if: success(), so they still run when an earlier step fails, and you see every problem at once.
    • mypy and pyright keep continue-on-error, because they have existing errors. Making them blocking would be a separate, bigger job.

Verified

With ruff 0.15.20, running what CI runs:

  • ruff format --check: 429 files already formatted.
  • Import order on arcade and tests: all checks passed.
  • ruff check arcade tests: all checks passed.
  • The workflow file parses as valid YAML.

This PR's own Code Inspections run is the real test: it should pass with the steps now blocking.

No library behavior changes, so there's no changelog entry.

🤖 Generated with Claude Code

Paul V Craven and others added 3 commits October 7, 2026 13:29
CI runs these checks but ignores their results, so errors built up.
Fix them with ruff 0.15.20, the version uv.lock pins:

- Reflow the 28 docstring lines over 100 characters in
  arcade/input/manager.py and arcade/application.py.
- Declare the re-export in arcade/cli/__init__.py in __all__.
- Sort imports in arcade (15 files) and tests (92 files) with ruff.
- Format tests/integration/test_ubo_stress.py and
  tests/unit/rendering/image_compare.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Remove tests from ruff's lint exclude, and run ruff check and the
  import order check on tests as well as arcade in make.py.
- The formatting and linting steps no longer continue on error, so a
  PR with ruff errors fails the Code Inspections check. Every step runs
  even if an earlier one fails, so all problems are reported together.
  Type checking still doesn't fail the check, since mypy and pyright
  have existing errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pyglet clone in my checkout made ruff treat pyglet as first party,
so the import order fixes grouped pyglet with arcade, and CI (with
pyglet installed as a package) reported 14 files as unsorted. Tell ruff
pyglet is third party, so the order doesn't depend on the checkout, and
sort again. Checked in a clean worktree without the clone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pvcraven
pvcraven merged commit 6f8fe2f into development Oct 7, 2026
7 checks passed
@pvcraven
pvcraven deleted the ci/blocking-ruff branch October 7, 2026 19:53
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