Skip to content

Upgrade Ruff to 0.16.0 - #2

Draft
adewale wants to merge 1 commit into
mainfrom
agent/upgrade-ruff-0.16
Draft

Upgrade Ruff to 0.16.0#2
adewale wants to merge 1 commit into
mainfrom
agent/upgrade-ruff-0.16

Conversation

@adewale

@adewale adewale commented Jul 26, 2026

Copy link
Copy Markdown
Owner

What

Upgrade Ruff and its pre-commit hook to 0.16.0, apply the expanded default rules, and enforce Ruff in CI.

Why

Ruff 0.16 expands its default lint rule set. Pinning the tool keeps local, pre-commit, and CI results deterministic while allowing the repository to adopt those checks intentionally.

How

  • Pin Ruff to 0.16.0 in the development dependency group and lockfile.
  • Require the same runtime version in pyproject.toml.
  • Update ruff-pre-commit to v0.16.0.
  • Apply Ruff's import, typing, datetime, and simplification fixes.
  • Document the intentional broad exception boundaries around Worker and WebSocket callbacks.
  • Add Ruff checking to the existing CI job.

Testing

  • Ruff 0.16 check — passes.
  • Git diff whitespace check — passes.
  • Full pytest run — 4 passed, 1 xfailed, 1 xpassed, and 4 local Worker setup errors. The errors came from Pyodide package installation/startup, including an unsupported MarkupSafe binary and local pywrangler servers that did not become ready.

Risk

Low to moderate. The automated changes are mechanical, but they touch several independent examples. CI's Linux Worker environment remains the authoritative integration check.

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