style(type): fix typing issues found by ty
Metadata
Current evaluation
Merged as commit 1a30eec, fixing type-checking edge cases found by ty; the remaining diagnostic was an upstream false positive tracked in astral-sh/ty#553.
Resolution: closed resolved
Reason: PR canonical/craft-platforms#139 was approved with no unresolved review comments and merged as commit 1a30eec, resolving the identified typing issues.
Evaluated by: mr-cal-bot
No scores available.
Issue body
ty isn't ready for production use yet, but it did find some edge cases not considered.
- [x] Have you followed the guidelines for contributing?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `make lint && make test`?
---
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged as commit 1a30eec, fixing type-checking edge cases found by ty; the remaining diagnostic was an upstream false positive tracked in astral-sh/ty#553. | |
| qwen/qwen3.6-35b-a3b | — | closed resolved | Merged PR fixing typing issues found by ty. Addressed a false positive in tests/conftest.py linked to upstream issue astral-sh/ty#553. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Related To:
ty#553
(confidence 100%)
The remaining ty diagnostic for pytest.fail was reported there as an upstream false positive.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #407 style(types): enable type checking with ty | craft-cli | merged | Merged as d38e0f4: enabled Astral ty type checking, added it to the lint workflow, and included it in lint build dependencies. | |
| #472 style: enable ty by default | starbase | merged | Merged PR #472 as commit 7982765, making Astral ty a default type-checking option while retaining existing checkers. | |
| #446 style(lint): fix typing for ty update | craft-cli | merged | Merged PR #446 as commit 75ec620, updating typing for the ty linter and applying minor style fixes across three files. | |
| #885 style: enable type checking with ty | craft-providers | merged | Merged as commit 28ccfe5, PR #885 enabled ty type checking and fixed resulting errors across 8 files; all CI checks passed. | |
| #2726 style: switch type checking to ty | charmcraft | merged | PR #2726 merged as commit f2e05e81, switching Charmcraft type checking to Astral ty and fixing existing ty errors. | |
| #910 style: fix ty error | craft-providers | merged | Merged in #910 via commit 30fc806, adding a targeted suppression for a ty false positive; all listed CI checks passed. | |
| #242 style: fix ty linting error | craft-platforms | merged | Merged PR #242 with a one-line fix for the ty linting error; the change landed as commit e8b89ce. | |
| #1126 style: fix ty errors | craft-application | merged | Merged PR #1126 (commit 9f5e0e76): small +8/-10 style fix taking advantage of ty's new Pydantic support, clearing remaining type-checker errors. | |
| #485 style: ty 0.0.79 | craft-cli | closed | Merged into main: a +2/-2 line one-file style fix for the new error reported by the ty 0.0.79 type checker, by maintainer mr-cal; review approved, all 25 CI checks green. Ty was later bumped to 0.0.82 in craft-parts#1727. | |
| #27 ci: type check with ty | craft-artifacts | merged | Merged PR #27 as commit 716f05a, adding ty type checking to CI and suppressing intentional type violations; related lint fixes landed in #20. |