Skip to content

Let tools know this library supports type hints #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 2, 2025

Conversation

negz
Copy link
Member

@negz negz commented Apr 1, 2025

Description of your changes

https://typing.python.org/en/latest/spec/distributing.html#packaging-type-information https://typing.python.org/en/latest/guides/libraries.html#marking-a-package-as-providing-type-information

It turns out we need to add a py.typed file so that tools will know this library has type hints. As far as I can tell we don't need to do anything special to have our build tool (Hatch) include this file when it builds and packages the library.

I have:

https://typing.python.org/en/latest/spec/distributing.html#packaging-type-information
https://typing.python.org/en/latest/guides/libraries.html#marking-a-package-as-providing-type-information

It turns out we need to add a py.typed file so that tools will know this
library has type hints. As far as I can tell we don't need to do
anything special to have our build tool (Hatch) include this file when
it builds and packages the library.

Signed-off-by: Nic Cope <nicc@rk0n.org>
@negz negz requested a review from bobh66 April 1, 2025 13:40
@negz negz merged commit 8895e9d into crossplane:main Apr 2, 2025
6 checks passed
@negz negz deleted the typical branch April 2, 2025 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants