← Back to issue list

style: enable strict type checking with pyright

View original Github issue

Metadata

Project
craft-parts
Number
#1294
Type
pull request
State
merged
Author
bepri
Labels
Created
Updated
Closed

Current evaluation

Merged PR enabling strict type checking with pyright. All resulting type errors were resolved, improving the project's typing and linting status. The change passed CI checks and was approved, successfully integrating stricter type safety.

Suggested action:

No scores available.

Issue body

- [x] Have you followed the guidelines for contributing? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `make lint && make test`? - [ ] Have you added an entry to the changelog (`docs/reference/changelog.rst`)? --- Enables strict type checking with pyright and then resolves all of the resulting messages. This is part of a series of PRs to improve the typing and linting status of Craft Parts to be more on-par with our other libraries. This branch has been installed and had linters ran on {Charm,Rock,Snap}craft and Craft Application.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged PR enabling strict type checking with pyright. All resulting type errors were resolved, improving the project's typing and linting status. The change passed CI checks and was approved, successfully integrating stricter type safety.
qwen3.6-35b-a3b-mtp-q6 Merged. Enabled strict type checking with pyright and resolved all resulting type errors. This update improves typing and linting standards across Craft Parts and related projects.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2052 style(type): make pyright stricter charmcraft merged Merged changes that enforce stricter pyright type checking by converting two warnings to errors and resolving the resulting type issues across 16 files.
78%
#1574 style(type): enable stricter pyright rules charmcraft merged Merged changes enabling stricter pyright type checking rules. Approved by two reviewers, the update modifies three files with a +4/-15 line diff to enforce stricter static analysis standards.
77%
#158 style(types): update pyright craft-store merged Merged following approval by two reviewers and successful CI checks. The change updated pyright type checking configuration, modifying two files with minimal adjustments to align with updated pyright standards.
76%
#58 lint: fix typing issues with updated pyright craft-archives merged Merged following reviewer approval and successful CI checks. Fixed typing errors introduced by an updated pyright version across seven files. Improved overall code coverage by 0.03%.
75%
#4205 lint: fix for pyright 1.1.312 snapcraft merged Merged a fix for type errors in account.py triggered by Pyright 1.1.312's stricter kwargs validation. The change corrects type annotations, passes CI, and was approved by a reviewer.
75%
#1258 Improve typing and linting craft-parts open Maintainer request to fix type errors instead of silencing with noqa and enable pyright strict mode. Core request completed: PR #1294 enabled strict pyright and follow-ups removed unnecessary noqa's. Inactive and closable.
74%
#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.
74%
#326 fix type checking craft-providers open Enhancement to improve type checking with pyright strict mode and mypy. Issue is 1172 days old; project has since migrated to ty and dropped mypy/pyright.
74%
#1525 build: enable pyright charmcraft merged Merged changes enabling pyright type checking. Configured a gradual rollout by downgrading type errors to warnings. Approved by two reviewers, the update modifies 12 files with a +60/-31 line diff.
73%
#186 style(typing): update pyright craft-application merged Merged after updating pyright configuration and typing across seven files. Approved by two reviewers, passed CI checks, and maintained 99.28% test coverage with 29 additions and 20 deletions.
73%