chore: publish inline type annotations#224
Merged
Brooke-white merged 1 commit intoaws:masterfrom Jun 27, 2024
Merged
Conversation
Allow inline type hints to be packaged and distributed following PEP561 specification https://peps.python.org/pep-0561/#specification
Contributor
|
Hi @jamesdow21 , thank you for taking the time to open this PR and for your patience. I am going to pull your changes in locally and perform some testing on my end. Once that completes, barring any issue, I anticipate we can get this PR merged. |
Brooke-white
approved these changes
Jun 27, 2024
|
Is this actually valid, though? Were type annotations added to all the code and is mypy being run over this codebase as part of its CI? |
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.
Description
Adding a blank "py.typed" marker file will allow mypy to recognize that type annotations are provided inline.
Motivation and Context
Currently, mypy is not able to analyze any usage of this library and gives the following error
Fixes #223
Testing
Ran build.sh and verified that the py.typed file ends up in the sdist and wheel
No code has been changed, so I didn't add any unit tests
There were 3 unit tests that failed for me locally; however, that was also the case on master before making any changes.
Screenshots (if appropriate)
Types of changes
Checklist
./build.shsucceedspytest test/unitand they are passing.