← 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 as bb62329e, enabling strict Pyright type checking and fixing resulting errors across 58 files.

Resolution: closed resolved

Reason: PR #1294 was merged as commit bb62329e after maintainer review; it enabled strict Pyright checking and resolved the resulting diagnostics.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Merged as bb62329e, enabling strict Pyright type checking and fixing resulting errors across 58 files.
stealth/space-bunny-alpha — closed resolved Merged as bb62329e (#1294), enabling strict Pyright checking and fixing resulting type errors across 58 files.
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 work

  • Superseded By: canonical/craft-parts#1706 (confidence 100%)

    Later removed Pyright in favor of ty, but does not negate PR #1294's successful merge.

Related issues

Issue Project State Summary Similarity
#1574 style(type): enable stricter pyright rules charmcraft merged Merged PR #1574 in commit 3445f5f4, enabling stricter Pyright type-checking rules across three files.
83%
#58 lint: fix typing issues with updated pyright craft-archives merged Merged PR #58 as commit 7983916, fixing typing issues across seven files after Pyright was updated.
80%
#1614 style(typing): enable most disabled pyright checks charmcraft merged Merged as commit 66952557, enabling most previously disabled Pyright checks and updating typing across 16 files.
78%
#1525 build: enable pyright charmcraft merged Merged PR #1525 as commit 6374ef9e, enabling Pyright with existing type errors downgraded to warnings for gradual adoption.
77%
#186 style(typing): update pyright craft-application merged Merged PR #186 as commit 43e6f1b9, updating Pyright configuration and typing across seven files (+29/-20).
77%
#2052 style(type): make pyright stricter charmcraft merged Merged PR canonical/charmcraft#2052, promoting two Pyright warnings to errors and fixing the resulting type errors across 16 files.
75%
#158 style(types): update pyright craft-store merged Merged into main as commit 1b66727, updating Pyright typing configuration in two files after approval by two reviewers.
75%
#639 style: update pyright craft-parts merged Merged #639 in commit 162a3522, updating Pyright and including codespell autofixes across four files.
74%
#456 fix: resolve pyright errors surfaced by re-enabled strict type checking imagecraft closed Closed unmerged as a draft; the Pyright fixes were folded into the merged Starbase update #449 (commit aa3de58).
74%
#237 style: fix pyright config craft-cli merged Merged #237 (commit 675d42a), updating two Pyright ignore patterns so they apply recursively.
73%