Repository navigation
Conversation
why: Contributors and CI need the same type checks across the package, tests, pytest fixtures, and Sphinx configuration. what: - Run ty in CI, Make, and the editor using the locked dev dependency. - Keep checking generic arguments and dynamic returns with ty and require parameter and return annotations with Ruff. - Exempt only ty from the release cooldown for the checker migration.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #72 +/- ##
=======================================
Coverage 97.40% 97.40%
=======================================
Files 5 5
Lines 154 154
=======================================
Hits 150 150
Misses 4 4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tony
added a commit
that referenced
this pull request
Nov 29, 2026
why: Contributors need the supported checker and its scope in the release notes. what: - Summarize the migration and link its pull request.
why: Contributors need a consistent way to resolve typing ambiguities while preserving the contract callers rely on. what: - Describe the limited uses of object and Any at input boundaries. - Check precise signatures against supported callers, misuse and downstream inference.
why: Contributors need the supported checker and its scope in the release notes. what: - Summarize the migration and link its pull request.
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.
Closes #71.
CI,
make ty, watch mode and the editor now check with ty 0.0.113. The gate still covers the package, tests, root fixture and Sphinx configuration. Ruff enforces parameter and return annotations. The Python sources and public CLI are unchanged. Checker configuration · CI invocationBenchmark observations
Mean wall-clock time ± sample standard deviation across eight fresh processes per cell, using Hyperfine 1.20.0 on Linux x86_64, CPython 3.15.0 and uv 0.13.10. Both checkers targeted Python 3.11 and read the same files and installed packages. All 32 timed commands exited 0. Both checkers reported zero diagnostics in untimed empty-cache and repeat runs.
Cold samples started with an empty checker cache. The OS filesystem cache remained available for every sample. mypy produced a persistent cache. The ty CLI wrote no files to its isolated cache directory, so its warm row measures repeated fresh processes. Installation and environment setup were outside the timed commands. Trunk mypy settings · Trunk lock · Candidate lock
The common file manifest consists of conftest.py, docs/conf.py, package metadata, the CLI and the CLI tests.
Benchmark commands and pinned configurations · File manifest · All 32 samples
Verification
The release note for #72 records the changes for this release.
Type-checker benchmark
On g’s five tracked Python files, ty averaged 41.9 ms with an empty checker cache and 43.0 ms on repeat invocations. The mypy baseline uses g’s pre-migration strict configuration, mypy 2.4.1, and its locked stub packages. The five Python files are byte-identical across the two commits. Trunk mypy settings · Migration ty settings · Trunk lock · Migration lock
Each cell gives the mean wall time and sample standard deviation across eight fresh CLI processes. All 32 measured invocations exited 0. Both checkers reported zero errors and warnings on separate empty-cache and repeat checks. Both targeted Python 3.11 and used the same CPython 3.15.0 environment, including
types-docutils0.23.0.20261122 andtypes-pygments2.21.0.20261122.Hyperfine 1.20.0 timed the installed checker binaries on Linux x86-64 (Core i7-12700H). The cold series cleared mypy’s module cache before each run. The warm series reused it after two untimed warmups.
ty checkexposed no persistent cache option and wrote no files under its isolated cache directory. Its repeat series timed fresh processes after two untimed runs. The OS page cache stayed warm. Installation, diagnostics capture, Ruff and pytest ran outside the timed commands.Wall time for each sample
File manifest
Both checkers received these five paths as explicit arguments, matching the tracked Python files under trunk CI’s
mypy .invocation. The two snapshots contain no tracked.pyifiles.conftest.pydocs/conf.pysrc/g/__about__.pysrc/g/__init__.pytests/test_cli.pyReproduce
Run from a clone containing both commits with Bash, uv 0.13.10, Hyperfine 1.20.0 and jq. The script reads the two snapshots into a temporary directory and prints the directory containing the four raw timing files.
The Python typing policy describes how to check a proposed signature against downstream callers and when an open input type is appropriate.
Hosted checks
Checks on 317ec6c0821d
Passed — CodeQL · Analyze (python) · Analyze (actions) · build (3.15).
Skipped — release · release · build.