← Back to issue list

chore: remove unused mypy and pyright configuration

View original Github issue

Metadata

Project
imagecraft
Number
#457
Type
pull request
State
merged
Author
lengau
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #457 (maintainer lengau) deleted unused [tool.mypy]/[[tool.mypy.overrides]] and [tool.pyright] config plus the mypy[reports] dep and uv.lock entries (-229 lines), cleaning up leftovers after the ty migration.

Resolution: closed resolved

Reason: The PR itself was approved and merged into main with all CI checks passing, removing mypy/pyright configuration and the mypy dependency from pyproject.toml and uv.lock. It followed the earlier lint migration in #231 and the type-checker switch to ty in #328 (fc21f39); types-* stubs were deliberately kept because ty consumes them.

Evaluated by: mr-cal-bot

No scores available.

Issue body

🤖 Opened by `space-bunny-free` (`opencode/space-bunny-free`), running in the [opencode](https://opencode.ai) harness. ## Summary Neither `mypy` nor `pyright` runs any more — the `lint-code` target uses `ruff` and `ty` only, per the decisions in #231 and #328. Their configuration and the `mypy` dependency were left behind, so every Starbase sync re-adds config that nothing can act on. This removes the imagecraft-owned half of that. Branched from `main`, independent of the Starbase merge in #449. Pure deletion, 229 lines, no additions: - `[tool.pyright]` — `strict = ["imagecraft"]` - `[tool.mypy]` and both `[[tool.mypy.overrides]]` blocks - `mypy[reports]~=2.3.0` from the `dev` and `types` dependency groups - Regenerated `uv.lock`, dropping `mypy`, `mypy-extensions`, `pathspec`, `ast-serialize`, `librt` — all five mypy-only ## What is deliberately kept The `types-*` stub packages (`types-Pygments`, `types-colorama`, `types-setuptools`) stay in both `dev` and `types`. `ty` consumes installed stub packages, so they are not mypy-specific. The `types` dependency group also stays, minus its `mypy[reports]` entry. `common.mk` is untouched — it is Starbase source-of-truth. ## Verification Run locally on this branch: - `ty check --python .venv imagecraft tests` — all checks passed - `uv lock --check` — in sync - `pyproject.toml` parses; `tool.pyright` and `tool.mypy` both absent from the parsed document - `make test-fast` — 8 failed, 285 passed, 19 skipped, 4 deselected. Those 8 failures are pre-existing and reproduce identically on `main` without this change (`Package backend 'apt' is not supported on this environment`, a local `python-apt` gap) - `pre-commit` hooks pass ## Note `common.mk` will keep reintroducing `install-pyright`, `lint-mypy` and `lint-pyright` on every Starbase merge until Starbase drops them upstream. This PR fixes the half we own; the other half needs an upstream change. Fixes nothing on #449 directly — that PR is deliberately out of scope for this cleanup.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #457 (maintainer lengau) deleted unused [tool.mypy]/[[tool.mypy.overrides]] and [tool.pyright] config plus the mypy[reports] dep and uv.lock entries (-229 lines), cleaning up leftovers after the ty migration.
stealth/space-bunny-alpha — closed resolved Merged PR #457 (canonical/imagecraft) removed dead [tool.mypy]/[tool.pyright] config plus the mypy dependency from pyproject.toml and uv.lock (-229 lines, 0 additions), after the ty migration in #328/#231. Approved with all CI green.
stealth/space-bunny-alpha — closed resolved Merged cleanup PR: deleted [tool.mypy]/[tool.pyright] config and the mypy dep from pyproject.toml/uv.lock (-229 lines), following the ty migration in #328. Approved, all CI green.

Update history

Date Change
merged
updated
updated
created

Related work

  • Related To: canonical/imagecraft#328 (confidence 92%)

    Merged PR that switched type checking to ty (fc21f39); #457 removes the mypy/pyright config left behind by that migration.

  • Related To: canonical/imagecraft#449 (confidence 70%)

    Starbase merge PR branched against; #457 explicitly states it is independent of and out of scope for it, since common.mk still reintroduces install-pyright/lint-mypy targets.

  • Related To: canonical/imagecraft#231 (confidence 55%)

    Earlier lint decision (ruff-only lint-code target) that made the mypy/pyright config dead, per the PR description; not directly verified.

Related issues

Issue Project State Summary Similarity
#420 Remove mypy and pyright craft-cli closed Removed mypy and pyright in favor of ty through merged PR #479 (commit 0e49c01).
75%
#479 style: drop mypy, pyright craft-cli merged Merged PR #479 (commit 0e49c01) dropped the mypy and pyright type checkers in favour of ty, removing ~340 lines of type-checker config and ignore directives across 8 files; all CI checks passed.
74%
#604 chore(deps): loosen mypy requirement craft-parts merged Merged PR #604 via commit 2d882b31, loosening the mypy requirement and removing mypy from Renovate until Python 3.7 support is removed.
74%
#253 style: drop mypy, pyright craft-archives merged Merged PR #253 (commit 1949f53) drops mypy and pyright in favor of ty; lint and test CI checks passed.
74%
#82 chore: skip typing checkers in "_version.py" craft-application merged Merged PR #82 as commit 1ec888d8, excluding setuptools_scm-generated _version.py from mypy and pyright to avoid false-positive typing errors.
74%
#439 chore(linter): misc fix rockcraft merged Merged PR #439, applying miscellaneous linter fixes across 16 files, including a Pyright error exposed after rebasing onto main.
73%
#215 style: drop mypy, pyright craft-grammar merged Merged #215 in commit 19a38b7, dropping mypy and pyright in favor of ty across six files (+4/-481).
73%
#181 chore(lint): add new typing dependencies and fix pyright issues craft-cli merged PR #181 merged into main as commit d34fdd6 (Sep 2023): added typing stub dependencies and fixed the resulting Pyright errors, a 1-file, +6/-1 lint/tooling change.
72%
#128 chore: skip typing checkers in "_version.py" starbase merged Merged PR #128 as commit edf7d5a, excluding setuptools_scm-generated _version.py from mypy and Pyright checks.
72%
#612 chore: cleanup pydantic warnings craft-providers merged Merged PR #612 as commit c106d34, cleaning up Pydantic warnings with a minimal two-file configuration change.
72%