fix(types): address pyright errors on intentional invalid inputs
Metadata
Current evaluation
Closed unmerged; added pyright ignore comments for intentional invalid inputs and pylxd instances.exists. Obsolete after #1007 dropped pyright.
Resolution: closed superseded
Reason: PR #1007 ('style: drop mypy, pyright') removed pyright, making these pyright ignore comments unnecessary; no merge commit for #1021 was found.
Evaluated by: mr-cal-bot
No scores available.
Issue body
🤖 [BEEP BOOP, A BOT WROTE THIS COMMENT - mimo-v2.6-flash-free, opencode]
Add `# pyright: ignore[...]` comments alongside the existing `# ty: ignore[...]`
comments on lines that intentionally pass invalid values, plus the pylxd
`instances.exists` attribute access.
Covers all 8 default-configuration pyright errors:
- `tests/integration/test_relaunch.py:61` (union alias passed to overloaded ctor)
- `tests/unit/bases/test_get_base.py:44` (deliberately invalid alias string)
- `tests/unit/lxd/test_lxd_instance.py:480` (mock attribute assignment)
- `tests/unit/lxd/test_remotes.py:180` (deliberately invalid `alias=-1`)
- `craft_providers/lxd/lxd_instance.py:299` (`instances.exists` on pylxd type)
No behaviour changes; comments only. Validation: `pyright` 0 errors,
`ty check` unchanged (its 6 contextmanager warnings are fixed by a separate
preparation PR), `ruff` clean, `mypy` unaffected (tests are not part of the
mypy target; the library-file comment is invisible to mypy).
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| ~deepseek/deepseek-pro-latest | — | closed superseded | Closed unmerged; added pyright ignore comments for intentional invalid inputs and pylxd instances.exists. Obsolete after #1007 dropped pyright. | |
| ~deepseek/deepseek-pro-latest |
Impact:
20
Quick Win:
8
Complexity:
10
Confidence:
60
Actionability:
45
|
keep open | Adds pyright ignore comments alongside existing ty ignores for intentional invalid inputs and pylxd instances.exists; comments only, no behavior change. CI has lint/files and OSV-scanner failing. |
Update history
| Date | Change |
|---|---|
| closed | |
| created |
Related work
-
Superseded By:
craft-providers#1007
(confidence 80%)
Commit 232143d9 dropped mypy and pyright, obsoleting pyright-specific ignore comments.
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. |