Skip to content

fix(types): pass ty 0.0.104 - #8

Merged
georgiedekker merged 2 commits into
mainfrom
lane/ty-0104
Nov 14, 2026
Merged

georgiedekker merged 2 commits into
mainfrom
lane/ty-0104

Conversation

@nonagenticai-claude

Copy link
Copy Markdown
Contributor

Prepares this repo for the shared CI archetype bump from ty 0.0.39 to ty 0.0.104. Before this change uvx ty@0.0.104 check src reported 8 diagnostics.

Diagnostics fixed

# Diagnostic File Fix
1 warning[renamed-rule-in-ignore-comment] x6 — invalid-mutable-override renamed src/models/errors.py (lines 102, 143, 159, 175, 191, 211) Renamed the rule in the existing # ty: ignore[...] comments to incompatible-mutable-override. Same suppression, current rule name.
2 warning[renamed-rule] — unresolved-import renamed pyproject.toml [tool.ty.rules] Renamed the key to import-not-found (ty's current name for the same rule).
3 error[missing-union-attribute] — Attribute 'value' is not defined on 'None' in union 'Unknown | None' src/services/system_dependency_manager.py:831 Real None union, fixed in code: _install_packages_with_retry now returns False with an error log when self.package_manager is None, before touching .value. This matches the existing guard idiom in _install_dependencies. The old else branch is now only reachable with a non-None manager, so its redundant if self.package_manager else "unknown" was simplified (this also clears the redundant-condition diagnostic the guard introduced).

Also included (local gate only)

invalid-argument-type at src/routers/security/dependency_inventory.py:287 — ty 0.0.104 does not report it, but the repo's mandatory local pre-push hook (still pinned to ty 0.0.39, mirroring the archetype before this bump) fails on it locally and therefore blocked the push. Fixed by annotating ecosystems: set[Literal["pypi", "crates.io"]], which is what the value actually is at runtime; both ty versions are clean with it. It is behaviour-preserving.

Verification

  • uvx ty@0.0.104 check src — All checks passed!
  • uv run ruff check . — All checks passed!
  • uv run ruff format --check . — 193 files already formatted
  • local pre-push gate: ty@0.0.39 passed (warnings only), 2910 passed / 5 skipped

🤖 Generated with Claude Code

georgiedekker and others added 2 commits November 14, 2026 08:58
- rename ignore-comment rule invalid-mutable-override to
  incompatible-mutable-override (renamed in ty 0.0.104)
- rename [tool.ty.rules] unresolved-import to import-not-found
- _install_packages_with_retry: guard package_manager is not None before
  use instead of reading .value off a possible None (missing-union-attribute)
- annotate ecosystems as set[Literal["pypi", "crates.io"]] so the
  "auto" branch keeps its literal element type

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@georgiedekker
georgiedekker merged commit a7ea8e2 into main Nov 14, 2026
7 checks passed
@georgiedekker
georgiedekker deleted the lane/ty-0104 branch November 14, 2026 09:21
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