Repository navigation
Conversation
why: The CLI, Sphinx directives, fixtures, and tests need the same typing checks in development and CI. what: - Pin ty in the dev and lint groups and exempt it from the cooldown. - Check the minimum and matrix Python targets, and require parameter and return annotations with Ruff. - Use the project checker in the editor and native watch command.
why: Docutils allows directive classes to clear their option mapping. The install and usage widgets use string validators for their variants. what: - Allow None in each option spec and declare the converter's string return type to match directives.choice.
why: Both lookups receive reflected ORM instances. Their mapped attributes provide the public field names used by the YAML output. what: - Iterate column attributes on the instance mapper in info and reverse. - Keep the human-readable field filter and empty-value handling. - Declare SQLAlchemy as a direct runtime dependency for the mapper API.
why: Color selection exposes a boolean even when the stream implementation returns a truth-valued integer from isatty. what: - Convert the terminal probe to bool after applying explicit color settings.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #365 +/- ##
==========================================
+ Coverage 89.42% 89.47% +0.04%
==========================================
Files 12 12
Lines 700 703 +3
==========================================
+ Hits 626 629 +3
Misses 74 74 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Nov 29, 2026
Merged
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 #364.
The CLI, tests, root pytest fixture and Sphinx extension now run through ty 0.0.113. Both the Python 3.11 minimum and the Python 3.15 CI target detected an invalid assignment in each of the 13 tracked files. Trunk used strict mypy, with five direct stub packages, no plugins and an exception for untyped imports from cihai. Removing that exception from the historical configuration exposed six import diagnostics in four files. The new configuration retains the stubs and adds a release cooldown exception for ty. Migration issue · Former checker configuration · Checker and CI changes · ty release
Typing changes
Published cihai 0.38.0 requires the SQLAlchemy mypy extra. That extra still installs mypy and types-greenlet transitively when installing this CLI. The upstream change removing that extra has merged. CLI installations will continue to resolve mypy until a compatible cihai release includes it. Upstream dependency change · CLI release note · CLI checks · Published dependency · Resolved dependency edge · SQLAlchemy extra
Verification
All 28 tests passed with coverage on CPython 3.11.15 and 3.15.0. Python 3.15 reported SQLite connection cleanup warnings. The Sphinx HTML build, Ruff lint and format checks, actionlint and lock validation passed. On the bundled Unihan data, the reverse search used for the output comparison returned six rows. Fixture
Type-checker benchmark
The mypy baseline uses the project’s pre-migration settings and dependency lock. Both tools checked the same 13 candidate files with Python 3.11.15. Both targeted Python 3.11. The two source snapshots differ in 3 of those files. 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 0 (16/16). ty 0.0.113 exited 0 (16/16). hyperfine 1.20.0 timed the installed checker executables on Linux x86_64. Stub packages in the shared environment include
types-colorama0.4.15.20260508,types-docutils0.23.0.20261122,types-greenlet3.5.0.20260518,types-pygments2.21.0.20261122,types-pyyaml6.0.12.20261122,types-requests2.33.0.20261030. Mypy used no configured plugins. Mypy searchedsrcfrom the measured source root. Explicit package bases were enabled. The historical config enabledignore_missing_importsforcihai.*. The project directly listed five stub packages. Its lockedcihaidependency also brought in mypy andtypes-greenletthroughsqlalchemy[mypy].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.
Diagnostics
mypy-trunkreportedSuccess: no issues found in 13 source files.Samples
File manifest
conftest.pydocs/_ext/cihai_install.pydocs/conf.pysrc/cihai_cli/__about__.pysrc/cihai_cli/__init__.pysrc/cihai_cli/_colors.pysrc/cihai_cli/_formatter.pysrc/cihai_cli/cli.pytests/__init__.pytests/conftest.pytests/test_cli.pytests/test_docs_examples.pytests/test_install_widget.pyReproduce
Run from a clone containing both revisions with bash, uv 0.13.10, hyperfine 1.20.0 and the utilities used below.
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 5d7ab107c7c2
Passed — codecov/project · CodeQL · Analyze (actions) · Analyze (python) · build (3.15).
Skipped — release · build · release.