← Back to issue list

style: configure ty

View original Github issue

Metadata

Project
snapcraft
Number
#5993
Type
pull request
State
merged
Author
PraaneshSelvaraj
Labels
Created
Updated
Closed

Current evaluation

Merged PR configuring the ty type checker with directory exclusions and suppressing unused-ignore-comment warnings in pyproject.toml. Follow-up PRs will address remaining warnings.

Suggested action:

No scores available.

Issue body

This PR works through `ty` checking and applies the same exclusions discussed in the issue #5970. Current state: - ty configured to ignore `snapcraft_legacy`, `tests/legacy`, `tests/spread`, `build`, `tools`, `venv` similar to mypy The goal is to align with the existing starbase setup without introducing behavioral changes. Further commits will reduce the remaining warnings incrementally. --- - [x] I've followed the [contribution guidelines](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md). - [x] 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. - [ ] I've updated the relevant release notes.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged PR configuring the ty type checker with directory exclusions and suppressing unused-ignore-comment warnings in pyproject.toml. Follow-up PRs will address remaining warnings.
qwen3.6-35b-a3b-mtp-q6 Merged ty linter configuration, applying mypy-style directory exclusions and suppressing unused-ignore-comment warnings in pyproject.toml. Linked a follow-up issue for mypy/pyright removal. Remaining ty warnings will be handled in separate PRs.
qwen3.6-35b-a3b-mtp-q6 Merged ty type checker configuration with mypy-compatible directory exclusions. Suppressed unused-ignore-comment warnings in pyproject.toml to avoid stacking inline comments, and linked to a follow-up issue tracking mypy and pyright removal.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#6045 fix(type): update ty config for unused-ignore-comment snapcraft merged Merged a configuration update renaming unused-ignore-comment to unused-type-ignore-comment, ensuring compatibility with ty linter version 0.0.15 and higher. Approved by reviewers and passed all CI checks.
77%
#472 style: enable ty by default starbase merged Merged to enable the ty type checker by default. Approved by two reviewers with all CI checks passing. The minimal configuration change lays groundwork for eventually replacing mypy and pyright once ty reaches stable release.
76%
#1698 style: ty craft-parts merged Enables ty as a lint target and fixes its warnings across 37 files (+69/-65). Fresh maintainer-authored PR, CI passing with some slow-test jobs pending, awaiting first review.
74%
#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.
71%
#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.
71%
#1126 style: fix ty errors craft-application merged Merged a style update to replace pydantic with ty for type checking, leveraging ty's new Pydantic support. Approved by reviewers, passed CI checks, and integrated into the codebase.
71%
#2726 style: switch type checking to ty charmcraft merged Merged after switching type checking to the ty tool. Resolves existing ty issues, approved by two reviewers, passed CI checks, and modified 40 files.
70%
#2692 style(type): add ty ignores charmcraft closed Closed without merging. The PR adding ty type ignores remained unreviewed with unresolved comments and multiple failing CI checks. The change was abandoned.
70%