Skip to content

Apply ruff autofixes and add a ruff CI job - #342

Merged
Oskar Haarklou Veileborg (BarrensZeppelin) merged 2 commits into
mainfrom
oskar/lint
Sep 4, 2026
Merged

Apply ruff autofixes and add a ruff CI job#342
Oskar Haarklou Veileborg (BarrensZeppelin) merged 2 commits into
mainfrom
oskar/lint

Conversation

@BarrensZeppelin

@BarrensZeppelin Oskar Haarklou Veileborg (BarrensZeppelin) commented Sep 4, 2026

Copy link
Copy Markdown
Member

Runs uv run ruff check --fix --unsafe-fixes over the tree and wires ruff into CI so it stays clean.

Changes

  • Ruff autofixes across 29 files: import sorting and regrouping (isort), removal of unused imports, dropped f prefixes on strings with no placeholders, dropped unused bindings, and == True/== False assertions simplified to truthiness checks.
  • New ruff job in .github/workflows/python-tests.yml, mirroring the checkout and Python setup from python-tests. It installs the dev extra rather than test, since that is where the ruff pin lives.

Notes for review

The ruff job isn't required to pass, so it only buys visibility for now.

Verification

uv run ruff check passes and the suite is green — 423 passed, 2 skipped.


Note

Low Risk
Style and import-only edits plus a non-blocking CI lint job; no changes to auth, API contracts, or core scan logic.

Overview
Adds a dedicated ruff GitHub Actions job that checks out the repo, installs deps with uv sync --extra dev, and runs uv run ruff check so lint stays enforced in CI (alongside existing unit tests and pip-audit).

The rest of the PR is mechanical ruff cleanup across the library and tests: isort-style import ordering, removal of unused imports (e.g. in lazy_file_loader, resource_utils, several test modules), dropping pointless f-strings in log messages, tightening bare except handlers, and small test tweaks (truthiness assertions, dropping unused result bindings). No intentional behavior changes beyond what those lint rules require.

Reviewed by Cursor Bugbot for commit 0d25ca1. Configure here.

Result of `uv run ruff check --fix --unsafe-fixes`: sort and regroup
imports (isort), drop unused imports, remove f-string prefixes from
strings with no placeholders, drop unused bindings, and simplify
`== True`/`== False` assertions to truthiness checks.
Mirrors the checkout and python setup from python-tests. Installs the
dev extra rather than test, since that is where the ruff pin lives.
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Version Check Failed

Please increment...

@BarrensZeppelin
Oskar Haarklou Veileborg (BarrensZeppelin) merged commit eb3e46a into main Sep 4, 2026
41 of 43 checks passed
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.

2 participants