fix: resolve pyright errors surfaced by re-enabled strict type checking
Metadata
Current evaluation
Closed unmerged as a draft; the Pyright fixes were folded into the merged Starbase update #449 (commit aa3de58).
Resolution: closed superseded
Reason: PR #456 was closed unmerged because its changes were absorbed into the Starbase update, #449, which merged as commit aa3de58.
Evaluated by: mr-cal-bot
No scores available.
Issue body
## What
Fixes 3 latent pyright errors in `imagecraft/models/volume.py`, `imagecraft/services/image.py`, and `tests/integration/services/test_project.py`.
## Why
These are surfaced while refreshing the stale Starbase merge PR (#449). The Starbase merge restructures the Makefile so that `lint-pyright` becomes part of `make lint` (it currently is not on `main`). Running pyright against current `main` in isolation confirms these 3 errors pre-exist independently of the merge itself — they were simply never checked before.
## Validation
- `make lint-pyright`: 0 errors, 0 warnings, 0 informations (previously 6 errors)
- `make lint`: passes
- `make test-fast`: 293 passed, 19 skipped, 4 deselected
This is a prep PR for #449 per the update-starbase process. Left as draft; not intended to be merged by the assistant.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed superseded | Closed unmerged as a draft; the Pyright fixes were folded into the merged Starbase update #449 (commit aa3de58). | |
| stealth/space-bunny-alpha | — | closed superseded | Closed unmerged as a draft prep PR for canonical/imagecraft#449; the Pyright fixes were handled through the merged Starbase update rather than this separate PR. |
Update history
| Date | Change |
|---|---|
| closed | |
| created |
Related work
-
Superseded By:
canonical/imagecraft#449
(confidence 99%)
The merged Starbase update incorporated the Pyright corrections and related lint changes.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #495 fix(types): address pyright and mypy type issues | craft-cli | closed | Type-checking fixes for pyright/mypy were closed without a direct merge; the changes are present in main via the Starbase synchronization merge. | |
| #1294 style: enable strict type checking with pyright | craft-parts | merged | Merged as bb62329e, enabling strict Pyright type checking and fixing resulting errors across 58 files. | |
| #249 build(deps): update dependency pyright to v1.1.380 | starbase | merged | Renovate's pyright 1.1.379 -> 1.1.380 dependency bump in starbase was approved and merged to main as commit b1ac980 (1 file, +1/-1). | |
| #65 Fixed new pyright issues. | craft-cli | merged | Maintainer PR fixing newly surfaced Pyright type errors (2-line change in 1 file). Merged into main as commit bbf67e4 via merge commit 88a68ac; Pyright was later dropped from the repo (#327, #479). | |
| #342 type: fix pyright possibly-unbound error | rockcraft | merged | Merged PR #342 fixed a Pyright possibly-unbound diagnostic with a small one-file change, landing as commit 06629929. | |
| #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. |