Skip to content

Chore: upgrade ruff to 0.16.x and ty to 0.0.71 #427

Description

@Alberto-Codes

What Needs Maintaining

  • Target: ruff and ty dev toolchain
  • Current version: ruff 0.15.5, ty 0.0.20
  • Target version: ruff 0.16.3, ty 0.0.71

Why Now

Both were deliberately held back during the August 2026 dependency sweep (#425). Neither carries a security advisory, so pinning them cost nothing on that front — but bundling their fallout into a security sweep would have buried a 1400-line lockfile diff under hundreds of mechanical style changes. They are now the only two dependencies knowingly behind.

Expected Fallout

Measured on 2026-08-13 by upgrading both and running the gates:

Gate Result
ruff check . 139 errors, 28 auto-fixable with --fix, 89 further hidden fixes behind --unsafe-fixes
ruff format --check . 50 files would be reformatted (of 833)
ty check 54 diagnostics

Representative samples:

  • RUF059 — unpacked variables never used, e.g. findings, stats, errors = _run_checks(...) in tests/unit/test_mcp.py. New rule behavior, mostly in tests.
  • ty invalid-assignment — "Property require_raises defined in EnrichmentConfig is read-only" in tests/unit/test_config.py, on lines that already carry # type: ignore[misc]. ty 0.0.71 appears to no longer honor those suppressions, so the fix is likely a different suppression form rather than a code change.
  • ty not-subscriptable — "Cannot subscript object of type object" on a line already carrying # type: ignore[index].

Note the ruff formatter also wants to reformat the suppression-comment fixtures (# docvet:ignore[missing-raises]# docvet: ignore[missing-raises]). Those spacing variants are deliberate test inputs for AC5 of story 32.4 — they must not be normalized. Check whether they need a # fmt: off guard or relocation out of formatter scope.

Verification

  • uv run pytest
  • uv run ruff check . / uv run ruff format --check .
  • uv run ty check
  • uv audit
  • uv run docvet check --all

Suggested order: bump ruff first and land its fixes, then ty separately — the two failure sets are unrelated and mixing them makes review harder.

Deferred from #425.

Activity

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

    choreMaintenance and housekeeping

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions