Skip to content

Add py.typed file to allow users to use the types this library provides #259

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 2 commits into from
Dec 11, 2019

Conversation

ckarnell
Copy link
Contributor

@ckarnell ckarnell commented Dec 9, 2019

I was generating type stubs for this library and noticed it already has some decent typing! This PR adds a py.typed file to the library, allowing consumers to use the types for type checking their own projects.

Copy link
Member

@Cito Cito left a comment

Choose a reason for hiding this comment

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

I think you also need to add package_data={"graphql": ["py.typed"]}, to setup.py.

@ckarnell
Copy link
Contributor Author

Ah, thanks @Cito . Added!

@ckarnell ckarnell requested a review from Cito December 10, 2019 23:33
@ckarnell ckarnell force-pushed the allow-use-of-typing branch from e0d774d to 6e1104e Compare December 11, 2019 14:28
@ckarnell ckarnell force-pushed the allow-use-of-typing branch from 6e1104e to 743f847 Compare December 11, 2019 14:34
@ckarnell
Copy link
Contributor Author

@Cito I added the required change and now tests seem to be failing, but not the same ones. Their output is a little hard to read, is there any chance you can help me understand?

@Cito
Copy link
Member

Cito commented Dec 11, 2019

@ckarnell. Tanks for the change. I have restarted the failing tests and their are green now. Looks like this is caused by dict sort order which is random in Py 2.7 and 3.4 where the tests were failing. This needs to be fixed independently if it happens again.

@Cito Cito merged commit a600f7c into graphql-python:master Dec 11, 2019
@ckarnell
Copy link
Contributor Author

@Cito Got it. Thank you!

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