Skip to content

build: adopt strict ty checks with prek - #246

Merged
joshuarli merged 1 commit into
mainfrom
codex/uv-ruff-ty-prek
Oct 20, 2026
Merged

joshuarli merged 1 commit into
mainfrom
codex/uv-ruff-ty-prek

Conversation

@joshuarli

@joshuarli joshuarli commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR is based on main after #236 merged. It replaces mypy/Pyright type checking with Astral ty and strengthens Ruff checks.

  • Replace the mypy hook and development dependency with ty.
  • Add Ruff annotation and stub rules, including preview rules.
  • Enable strict equality semantics and generic narrowing in ty, with explicit errors for unsound assignments, returns, and yields.
  • Fix annotations and call sites surfaced by the stricter checks.
  • Keep prek as the hook runner; its compatible .pre-commit-config.yaml format remains in use.

Python 3.13.16, uv 0.13.4, and the prek workflow are already in main from the merged Python and uv upgrades. The Colima/Lima work from #236 is also in main; this PR adds only tooling changes.

Verification

  • uv sync --locked
  • uv run ruff check .
  • uv run ruff format --check .
  • uv run ty check
  • uv run prek validate-config .pre-commit-config.yaml
  • uv run prek run ty shellcheck --all-files
  • uv run pytest tests/lib/test_archive.py tests/lib/test_colima_storage.py tests/lib/test_venv.py — 50 passed

The full test suite and formatter hook were not run locally.

Base automatically changed from ivan/colima-sve-kernel-upgrade to main October 20, 2026 19:32
@joshuarli
joshuarli marked this pull request as ready for review October 20, 2026 19:32
Use ty for type checking and activate the upstream strict typing profile with soundness checks. Keep the hook workflow on prek and align the lockfile with the new development toolchain.

Co-Authored-By: Codex GPT-6 <codex@openai.com>
@joshuarli
joshuarli force-pushed the codex/uv-ruff-ty-prek branch from 6b3eafb to 8351c24 Compare October 20, 2026 19:36
@joshuarli
joshuarli enabled auto-merge (squash) October 20, 2026 19:45
@joshuarli
joshuarli merged commit ff6e090 into main Oct 20, 2026
17 checks passed
@joshuarli
joshuarli deleted the codex/uv-ruff-ty-prek branch October 20, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants