Repository navigation
Conversation
why: The previous source list left the exporter tests outside the type gate. Those tests run the Python exporter used to assemble the site. what: - Pin ty 0.0.113 with its own package cooldown exception. - Check the maintained Python tests alongside scripts and exporter code. - Run the type and test commands on Python 3.12 and 3.14 in CI.
why: The fixture expects a loadable exporter module and a source line link. A missing loader or regex match should identify the failed setup. what: - Check the module specification and loader before executing the fixture. - Assert a native line match before reading the matched anchor.
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.
This branch was successfully deployed
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 #351.
The documentation site’s Python type check now includes the API-model tests. Its previous configuration covered the site scripts and exporter, leaving both Python test files outside the gate. The expanded check found four diagnostics in the Haskell exporter tests. They now require an importable exporter and a matching source link before using either value.
CI runs the existing Python toolchain on the supported 3.12 floor and the project’s 3.14 development interpreter. Both local suites passed 35 tests and 46 subtests. Ruff lint and formatting passed on both. On each target, a deliberately invalid assignment was detected in every one of the 12 tracked Python files. The existing lint configuration has no function-annotation requirement. The checker lock changed from ty 0.0.88 to 0.0.113 and retains the repository’s three-day cooldown for other packages.
Type-checker benchmark
The benchmark uses a synthetic mypy configuration. Its timings apply to the supplied benchmark configuration. Both tools checked the same 12 candidate files with Python 3.12.13. Both targeted Python 3.12. The two source snapshots differ in 1 of those files. The two series do not establish a clean-check speed ratio. Ty passed. Strict synthetic mypy reported 280 errors on the candidate and 284 on trunk. Mypy settings · Ty settings · Candidate lock · Baseline lock
The table gives mean wall time and sample standard deviation across 8 fresh CLI processes per cell. mypy 2.4.1 exited 1 (16/16). ty 0.0.113 exited 0 (16/16). hyperfine 1.20.0 timed the installed checker executables on Linux x86_64. Mypy used no configured plugins. Each sample launches one checker process over the same source manifest.
Cold runs cleared the checker cache before each sample. Repeat runs followed two untimed warmups. Mypy reused its module cache. Ty wrote no files under its isolated cache root, so its repeat timings measure another fresh process. The OS page cache stayed warm. Setup and diagnostics ran outside the timed commands.
Synthetic mypy configuration
Diagnostics
mypy-base-candidate-depsreportedFound 284 errors in 8 files (checked 12 source files).no-untyped-defat scripts/gen-tmux-layout-fixture.py, line 227.import-untypedat scripts/gen-tmux-layout-fixture.py, line 240.type-argat scripts/gen-tmux-layout-fixture.py, line 260.no-untyped-callat scripts/check-go-prose.py, line 177.assignmentat scripts/check-workspace-prose.py, line 209.var-annotatedat packages/api-model/scripts/export-haskell.py, line 366.dict-itemat scripts/check-inventories.py, line 543.The examples show 7 distinct checker/rule combinations. The totals include all reported locations.
Samples
File manifest
packages/api-model/scripts/export-haskell.pypackages/api-model/test/test_haskell_export.pypackages/api-model/test/test_python_scope.pyscripts/check-doxygen.pyscripts/check-example-prose.pyscripts/check-go-prose.pyscripts/check-inventories.pyscripts/check-workspace-prose.pyscripts/example_tmux_sandbox.pyscripts/gen-tmux-layout-fixture.pyscripts/read-elixir-toolchain.pyscripts/read-haskell-toolchain.pyReproduce
Run from a clone containing both measured revisions with bash, uv 0.12.0, hyperfine 1.20.0 and the utilities used below. The reproduction exits 1 if a historical control or synthetic checker returns nonzero.
The Python typing policy describes how to check a proposed signature against downstream callers and when an open input type is appropriate.
Hosted checks
The Python 3.12 and 3.14 jobs passed their type checks and tooling tests. Both F# extraction jobs passed. The full documentation integration suite and the preview publishing dry run passed. The preview publication was still syncing the audited site at the time of merge review. Python 3.12 · Python 3.14 · Full integration · Preview dry run · Preview publication · Checks on efaffbe2a0c9