feat(python): add typing support - #20
Merged
Merged
Conversation
Ship a py.typed marker and complete stubs for the public Python API, including tokenizer methods and agent-token constants. Include both typing artifacts in wheels and source distributions.
Move the hand-written API stubs into `_core.pyi` for the compiled extension module, leaving `__init__.pyi` as a thin re-export list, and have `generate_agent_tokens.py --update-stub` emit the agent-token classes and `__all__` there so the package's shipped `py.typed` stubs stay pinned to the same source of truth as the docs and Rust module. Add a CI step that runs `stubtest` against the built module to catch drift a diff cannot.
farhan-syah
force-pushed
the
python-typing
branch
from
August 22, 2026 01:13
e49f09c to
70c28fa
Compare
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.
Resolves #19
Ship a py.typed marker and complete stubs for the public Python API, including tokenizer methods and agent-token constants. Include both typing artifacts in wheels and source distributions.