Remove mypy and pyright
Metadata
Current evaluation
Mypy and pyright type checkers were removed to enable ty to clean up unused ignore comments. The request was resolved and merged via pull request #6247.
Suggested action: —
No scores available.
Issue body
### Check existing issues
- [x] I've verified that this request isn't described by any existing issues.
### Request
Snapcraft currently uses `mypy` and `pyright` for type checking.
While working on fixing ty warnings, some existing `# type: ignore[...]` comments were flagged by ty as unused. These ignores are still required by mypy or pyright, and removing them currently causes type-checking failures.
For example:
```python
sdk_version = properties.matter_sdk_version # type: ignore[attr-defined]
```
Removing this causes errors in mypy or pyright, but ty reports the ignore as unused.
To avoid stacking per-line ty ignores, the `unused-ignore-comment` rule is currently suppressed in ty via `pyproject.toml` with a link back to this issue.
### The problem it solves
Once `mypy` and `pyright` are removed entirely, the suppression in `pyproject.toml` can be removed, allowing ty to report truly unused ignore comments and clean them up in one pass.
Related PR: #5993
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Mypy and pyright type checkers were removed to enable ty to clean up unused ignore comments. The request was resolved and merged via pull request #6247. | |
| qwen/qwen3.6-35b-a3b | — | — | Removed mypy and pyright type checkers to resolve conflicts with the ty linter, enabling proper cleanup of unused type ignore comments. Resolved via PR #6247. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed by PR #6247. mypy and pyright were removed, enabling the ty type checker to properly detect and clean up unused ignore comments without legacy conflicts. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | mypy and pyright were removed to resolve conflicts with the ty type checker, enabling cleanup of unused type ignore comments. Fixed by merging pull request #6247. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Resolved by merging PR #6247. The mypy and pyright type checkers were removed to eliminate conflicts with ty regarding unused ignore comments, allowing ty to clean up the codebase. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #420 Remove mypy and pyright | craft-cli | closed | Replaced mypy and pyright with ty for type checking. The cleanup was completed and merged via pull request #479. | |
| #901 Remove mypy and pyright | craft-providers | open | Enhancement to remove mypy and pyright type checkers in favor of ty, following similar work in snapcraft#6007. Issue created by maintainer but has had no maintainer response or comments in 136 days. | |
| #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. | |
| #215 style: drop mypy, pyright | craft-grammar | merged | Merged a pull request replacing mypy and pyright with the ty type checker. After passing all CI checks and receiving two approvals, the change was successfully integrated, removing 481 lines of configuration across six files. | |
| #1007 style: drop mypy, pyright | craft-providers | merged | Removes mypy and pyright type checkers in favor of ty, updating Makefile, common.mk, pyproject.toml, and uv.lock across 16 files (+24/-241). Fresh maintainer PR, CI green, pending review; directly implements issue #901. | |
| #1706 style: drop mypy, pyright | craft-parts | merged | Merged after approval and passing CI. Replaced mypy and pyright with ty for type checking across 88 files. Redundant isinstance checks were deferred to a separate issue. | |
| #479 style: drop mypy, pyright | craft-cli | merged | Merged after approval from two reviewers; replaces mypy and pyright with ty, passing all CI checks. The change removed 341 lines and added 17 across 8 files. | |
| #263 Migrate type checking to ty. | imagecraft | closed | The request to replace mypy and pyright with ty was closed without comments or linked pull requests. No resolution or merge details were provided, indicating the task was abandoned or completed via an untracked PR. | |
| #421 style: drop mypy, pyright | craft-store | merged | Merged after approval from two reviewers; all CI checks passed. Replaces mypy and pyright with ty, removing 413 lines and adding 27 across 13 files. | |
| #253 style: drop mypy, pyright | craft-archives | merged | Merged after approval and passing CI. Removes mypy and pyright, replacing them with ty; 13 files changed (+16/-506). |