← Back to issue list

Remove mypy and pyright

View original Github issue

Metadata

Project
snapcraft
Number
#6007
Type
issue
State
closed
Author
PraaneshSelvaraj
Labels
—
Created
Updated
Closed

Current evaluation

Request to drop mypy and pyright for ty was resolved by merged PR #6247 ("style: go all-in on ty", commit 534d7dce7), which replaced both checkers with ty and removed the unused-ignore-comment suppression.

Resolution: closed resolved

Reason: Maintainer @mr-cal closed the issue on 2026-05-11 with "Fixed by #6247". PR #6247 was merged as commit 534d7dce7 ("style: go all-in on ty"), replacing mypy and pyright with ty and dropping the pyproject.toml suppression that referenced this issue.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Request to drop mypy and pyright for ty was resolved by merged PR #6247 ("style: go all-in on ty", commit 534d7dce7), which replaced both checkers with ty and removed the unused-ignore-comment suppression.
stealth/space-bunny-alpha — closed resolved Removed mypy and pyright in merged PR #6247 (commit 534d7dce7), adopting ty and removing the obsolete unused-ignore-comment suppression.
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.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#6247 (confidence 95%)

    Merged PR 534d7dce7 'style: go all-in on ty' — removed mypy/pyright in favour of ty; cited as the fix in the closing comment.

  • Related To: canonical/snapcraft#5993 (confidence 90%)

    Related follow-up PR (commit c220b3f74) that configured ty and added the unused-ignore-comment suppression this issue asked to remove.

  • Related To: canonical/snapcraft#6027 (confidence 55%)

    'style: Resolve remaining ty warnings' — part of the ty migration cleanup series preceding the all-in change.

Related issues

Issue Project State Summary Similarity
#420 Remove mypy and pyright craft-cli closed Removed mypy and pyright in favor of ty through merged PR #479 (commit 0e49c01).
87%
#6247 style: go all-in on ty snapcraft merged Merged PR #6247 (commit 534d7dce7) replaced mypy and pyright with ty, removed obsolete suppressions, and resolved #6007.
84%
#1706 style: drop mypy, pyright craft-parts merged Merged PR #1706 in commit 770e2130, replacing mypy and pyright with ty; redundant runtime type-check cleanup was deferred to #1707.
80%
#1007 style: drop mypy, pyright craft-providers merged Merged into main as commit 232143d, replacing mypy and pyright with ty and removing obsolete type-checker tooling.
79%
#479 style: drop mypy, pyright craft-cli merged Merged PR #479 (commit 0e49c01) dropped the mypy and pyright type checkers in favour of ty, removing ~340 lines of type-checker config and ignore directives across 8 files; all CI checks passed.
79%
#253 style: drop mypy, pyright craft-archives merged Merged PR #253 (commit 1949f53) drops mypy and pyright in favor of ty; lint and test CI checks passed.
79%
#215 style: drop mypy, pyright craft-grammar merged Merged #215 in commit 19a38b7, dropping mypy and pyright in favor of ty across six files (+4/-481).
78%
#901 Remove mypy and pyright craft-providers open Drop mypy/pyright in favour of ty. Makefile, CI and pyproject already use ty only; common.mk still defines lint-mypy, lint-pyright, install-pyright, and stale .gitignore/type: ignore entries remain. Mirrors snapcraft#6007 and craft-cli#420, both completed.
77%
#152 style: remove mypy and pyright to go all-in on ty debcraft merged Merged canonical/debcraft#152, removing mypy and pyright and standardizing type checking on Astral ty after approval by two reviewers.
76%
#1207 style: replace mypy and pyright with ty rockcraft merged Merged PR #1207 (commit 5d9356c1), replacing mypy and pyright type checking with Astral ty and updating lint configuration across 43 files.
76%