style: suppress ty warning
Metadata
Current evaluation
One-line style PR adding a ty type-ignore to silence ty 0.0.79's false-positive warning that user_files["shadow"] is always "". Approved by one reviewer and merged (+1/-1, 1 file); source-spread-tests was the only red check.
Resolution: closed resolved
Reason: PR canonical/rockcraft#1361 was approved and merged into main, changing a single line to suppress the ty 0.0.79 diagnostic on user_files["shadow"]. The author noted the warning is a false positive because earlier code can mutate the dict value. The only failing check, source-spread-tests, is unrelated to the type-ignore change.
Evaluated by: mr-cal-bot
No scores available.
Issue body
ty 0.0.79 thinks `user_files["shadow"]` is always `""`, but there is a block of code before hand that as far as I can tell can alter the dict value.
---
- [ ] I've followed the [contribution guidelines](https://github.com/canonical/rockcraft/blob/main/CONTRIBUTING.md).
- [ ] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/).
- [ ] I've successfully run `make lint && make test`.
- [ ] I've added or updated any relevant documentation.
- [ ] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing.
- [ ] I've updated the relevant release notes.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | One-line style PR adding a ty type-ignore to silence ty 0.0.79's false-positive warning that user_files["shadow"] is always "". Approved by one reviewer and merged (+1/-1, 1 file); source-spread-tests was the only red check. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged a one-line change suppressing ty 0.0.79's warning for user_files["shadow"]. Most CI checks passed; source-spread-tests failed. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a one-line change to suppress a ty 0.0.79 false positive on user_files["shadow"]. Approved by one reviewer and passed CI checks. |
Update history
| Date | Change |
|---|---|
| updated | |
| updated | |
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #938 style: ty | craft-providers | merged | Merged PR #938 as commit 44bcd1a, adding targeted ty suppressions across 8 files to ignore warnings introduced by the latest ty version. | |
| #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. | |
| #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. | |
| #434 style: silence ty warnings | craft-cli | merged | Merged PR #434 as commit ef91a65, adding targeted ty suppressions matching existing suppressions for other linters across two files. | |
| #1698 style: ty | craft-parts | merged | Merged PR #1698 as commit 6b4db96f, enabling ty as a lint target and fixing its warnings across 37 files. | |
| #6280 style: ty 0.0.44 | snapcraft | merged | Merged PR #6280 in commit 8b45efc80, applying ty 0.0.44 style updates after two approvals; unrelated CI failures did not block the merge. | |
| #2692 style(type): add ty ignores | charmcraft | closed | Closed unmerged; its generated ty ignores were superseded by merged PR #2726 (f2e05e81), which switched Charmcraft to ty with targeted suppressions. | |
| #6045 fix(type): update ty config for unused-ignore-comment | snapcraft | merged | Merged PR #6045 as commit 23e78c21e, renaming the ty setting to unused-type-ignore-comment for compatibility with ty 0.0.15 and newer. |