fix: enable better type hint support for PEP 561#812
Conversation
Signed-off-by: Samantha Coyle <sam@diagrid.io>
Signed-off-by: Samantha Coyle <sam@diagrid.io>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #812 +/- ##
==========================================
- Coverage 86.63% 86.40% -0.23%
==========================================
Files 84 89 +5
Lines 4473 5106 +633
==========================================
+ Hits 3875 4412 +537
- Misses 598 694 +96 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
this PR is ready for merge pls. I added a file providing users with type safety who import this pkg, so there is no impact on code coverage |
|
@holopin-bot @sicoyle Thank you! Here's a digital badge as a small token of appreciation. |
|
Congratulations @sicoyle, the maintainer of this repository has issued you a badge! Here it is: https://holopin.io/claim/cmi4hy56a000bjs04pgo8wyc5 This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account. |
Description
This PR adds a
py.typedmarker file and updatessetup.pyto include it inpackage_data. This signals to type checkers that the package provides inline type annotations, following PEP 561. It improves type-checking support for users of the package.For reference:
https://peps.python.org/pep-0561/#packaging-type-information
https://blog.whtsky.me/tech/2021/dont-forget-py.typed-for-your-typed-python-package/
Dapr Agents repo imports this as a dependency and bc this repo is missing the
py.typedfile, then all of my python sdk imports must have# type: ignorecomment otherwise I get an error on the import usingtox -e typecmd...Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #[issue number]
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: