← Back to issue list

style: switch type checking to ty

View original Github issue

Metadata

Project
charmcraft
Number
#2726
Type
pull request
State
merged
Author
lengau
Labels
Created
Updated
Closed

Current evaluation

Merged after switching type checking to the ty tool. Resolves existing ty issues, approved by two reviewers, passed CI checks, and modified 40 files.

Suggested action:

No scores available.

Issue body

This changes all of the type checking to use ty, fixing all the extant ty issues along the way. --- - [ ] I've followed the [contribution guidelines](https://github.com/canonical/charmcraft/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
qwen/qwen3.6-35b-a3b Merged after switching type checking to the ty tool. Resolves existing ty issues, approved by two reviewers, passed CI checks, and modified 40 files.
qwen3.6-35b-a3b-mtp-q6 Merged the migration to the ty type checker, resolving all pre-existing ty issues. The maintainer updated the configuration and verified the changes passed lint and test suites.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#407 style(types): enable type checking with ty craft-cli merged Merged pull request enabling type checking with ty. Approved by two reviewers with all CI checks passing. Changes add 21 lines and remove 3 across three files, successfully implementing the requested type checking improvements.
82%
#421 style: ty craft-cli merged Merged to update the ty tool, unblocking work on snapcraft issue #5673. Approved by two reviewers with all CI checks passing. Changes affect two files (+10/-5 lines) and create follow-up issue #420.
81%
#223 style: switch from mypy+pyright to ty craft-platforms merged Merged after approval by two reviewers and passing CI checks. Replaces mypy and pyright with the ty type checker across three files, reducing 266 lines.
80%
#6247 style: go all-in on ty snapcraft merged Merged after approval by two reviewers. The change adopts the ty linter for comprehensive typo detection, resolving issue #6007. It updated 47 files, reducing 370 lines and adding 139.
80%
#6015 style: fix additional ty warnings snapcraft merged Merged pull request resolving additional ty linter warnings for unsupported operators and non-subscriptable types. Approved by two reviewers, passed CI checks, and implemented a minimal two-file fix related to #5970.
78%
#242 style: fix ty linting error craft-platforms merged Merged a single-file change fixing a ty linting error. Approved by one reviewer and passed CI checks. The one-line modification resolves the style violation.
78%
#446 style(lint): fix typing for ty update craft-cli merged Merged a maintainer pull request fixing typing for the ty linter update. Approved by one reviewer, the change adjusted three files with minor style modifications. CI checks passed and the branch was successfully integrated.
77%
#328 chore: change type checking to use `ty` imagecraft merged Switched type checking to ty, resolving issue 263. Merged after two approvals and passing CI checks. Changes span three files with minimal code adjustments.
77%
#152 style: remove mypy and pyright to go all-in on ty debcraft merged Merged changes removing mypy and pyright type checkers to exclusively use the ty tool. Approved by two reviewers, passed CI checks, and modified 12 files with a net reduction of 154 lines.
76%
#2538 ci: adjust the ty experimental workflow to use beta charmcraft merged Merged a one-line update to switch the experimental ty type-checking CI workflow to the beta version. Approved by two reviewers, passed CI checks, and successfully integrated.
76%