Skip to content
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

Package py.typed files in the package data #127

Merged
merged 2 commits into from
Nov 20, 2023
Merged

Package py.typed files in the package data #127

merged 2 commits into from
Nov 20, 2023

Conversation

jarshwah
Copy link
Contributor

Setup tools doesn't automatically include py.typed files in the package
data until the next release after Nov 19, 2023, which means that types
that were previously exported now present as Any.

This change adds py.typed files to each of the sub-packages, and includes
them in the package data for each.

https://setuptools.pypa.io/en/latest/history.html#draft-unreleased-as-on-today

https://setuptools.pypa.io/en/latest/userguide/datafiles.html#package-data

Setup tools doesn't automatically include py.typed files in the package
data until the next release after Nov 19, 2023, which means that types
that were previously exported now present as Any.

This change adds py.typed files to each of the sub-packages, and includes
them in the package data for each.
Comment on lines +80 to +81
"xocto.events" = ["py.typed"]
"xocto.storage" = ["py.typed"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I'm not certain that we need these files for each of the packages listed. Mypy isn't clear on this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would [xocto] = ["**/py.typed"] be more future-proof?

@jarshwah jarshwah merged commit cec9945 into main Nov 20, 2023
1 check passed
@jarshwah jarshwah deleted the package-py-typed branch November 20, 2023 02:43
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.

3 participants