ty: type checking as a first-class gate#126
Merged
Merged
Conversation
[tool.ty] in root pyproject.toml; ty installed in the devcontainer via `uv tool install` alongside ruff; new `ty` CI job runs `uv sync` then `uvx ty@<pin> check`. post-create.sh runs `uv sync` so the editor's ty extension has a .venv to resolve against. Renovate's workflow-yaml regex widened to track the TY_VERSION env-var pin. README updated with the new CI row, on-save row, and recommended extension.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[tool.ty]to rootpyproject.toml(env py314,src = ["meta", "tools"], excludes mirror ruff's). Rule severities left at ty's defaults; tighten as real code surfaces categories worth escalating.tyin the devcontainer viauv tool install, reusing theUV_TOOL_{BIN_DIR,DIR}declaration from the ruff layer.TY_VERSIONARG is Renovate-tracked (pypi:ty).tyCI job:astral-sh/setup-uv@v6→uv sync(so ty can resolverequestsfor the smoke target) →uvx ty@<pin> check. Added tobuild-and-test-per-target.needs.post-create.shnow runsuv syncso theastral-sh.tyeditor extension has a.venvto resolve against.astral-sh.tyVS Code extension in bothdevcontainer.jsonand.vscode/extensions.json.renovate.json's workflow-yaml regex from[a-z-]*version:to[A-Za-z_-]*[Vv]ersion:so theTY_VERSION:env-var key is trackable. Follows the precedent of PR ruff: format + lint as a first-class gate #123, which widened the matcher to handle the priorpython-version:site.tyrow in the CI table, on-save table, and recommended-extensions list.This is PR 3 of the Python tooling bootstrap (continuation plan).
Test plan
Run inside the devcontainer:
ruff format --check .cleanruff check .cleanty checkclean (1 finding —requestsunresolved — fixed by addinguv syncto CI and post-create)bazel test //...— 11/11 passbazel run //:gazelle -- -mode=diffcleanpre-commit run --all-filescleanCI:
tyjob green on first pushbuild-and-test-per-targetrows gate on the newneeds:entry