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

Add py.typed marker #465

Merged
merged 3 commits into from
Jul 22, 2022
Merged

Add py.typed marker #465

merged 3 commits into from
Jul 22, 2022

Conversation

jasonpaulos
Copy link
Member

Currently we use mypy internally to type check our code, but unfortunately any packages that import PyTeal are not able to take advantage of our code's types when they use mypy.

The reason is the pyteal package must declare to mypy that we actually use types. More info can be found here, but for our purposes the answer is to simply add a py.typed file to our package.

I've verified this actually works and allows dependent packages to do proper type checking with our code as well.

@jasonpaulos
Copy link
Member Author

jasonpaulos commented Jul 21, 2022

I'm making this a draft until #264 is merged to avoid any further merge complications.

@jasonpaulos jasonpaulos marked this pull request as ready for review July 22, 2022 20:06
Copy link
Contributor

@michaeldiamant michaeldiamant left a comment

Choose a reason for hiding this comment

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

@jasonpaulos Matches how the docs recommend configuration. Thanks for considering the use case - makes a lot of sense to add in!

@jasonpaulos jasonpaulos merged commit 5294775 into master Jul 22, 2022
@jasonpaulos jasonpaulos deleted the py-typed-marker branch July 22, 2022 20:47
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.

None yet

3 participants