← Back to issue list

fix(types): address pyright and mypy type issues

View original Github issue

Metadata

Project
craft-cli
Number
#495
Type
pull request
State
closed
Author
lengau
Labels
—
Created
Updated
Closed

Current evaluation

Type-checking fixes for pyright/mypy were closed without a direct merge; the changes are present in main via the Starbase synchronization merge.

Resolution: closed superseded

Reason: No merge commit for #495 was found, and current main already contains the proposed type ignores and _Handler test check, indicating the PR was superseded by the Starbase synchronization merge.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Address type issues across `craft_cli` codebase: - Add type ignores for uninitialized `Emitter` attributes and custom argument parser. - Add pyright ignores for private usage on active guard attributes and `_Call` in `pytest_plugin`. - Check handler instance against `_Handler` in test. *Note: This is a preparation PR opened in advance of the Starbase synchronization merge.*

Evaluation history

Date Model Scores Action Summary
~deepseek/deepseek-pro-latest — closed superseded Type-checking fixes for pyright/mypy were closed without a direct merge; the changes are present in main via the Starbase synchronization merge.
~deepseek/deepseek-pro-latest
Impact: 20
Quick Win: 14
Complexity: 15
Confidence: 85
Actionability: 80
needs review Adds type-checking ignores for uninitialized Emitter attributes, custom argument parser, active guard private attrs, and pytest_plugin _Call; updates test to check _Handler instance. CI green, awaiting review.

Update history

Date Change
closed
created

Related issues

Issue Project State Summary Similarity
#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).
78%
#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.
72%
#1021 fix(types): address pyright errors on intentional invalid inputs craft-providers closed Closed unmerged; added pyright ignore comments for intentional invalid inputs and pylxd instances.exists. Obsolete after #1007 dropped pyright.
71%
#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.
70%