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 a py.typed file for PEP 561 compliance #93

Merged
merged 1 commit into from
Sep 16, 2019
Merged

Conversation

appleby
Copy link
Contributor

@appleby appleby commented Sep 16, 2019

This ensures that mypy can "find" the rcpq package when checking type annotations from pyquil (or any other package that uses rpcq).

This is tangentially related to work in rigetti/pyquil#999

https://www.python.org/dev/peps/pep-0561/
https://mypy.readthedocs.io/en/latest/installed_packages.html#making-pep-561-compatible-packages

This ensures that mypy can "find" the rcpq package when checking type
annotations from pyquil (or any other package that uses rpcq).

https://www.python.org/dev/peps/pep-0561/

https://mypy.readthedocs.io/en/latest/installed_packages.html#making-pep-561-compatible-packages
@appleby appleby requested a review from a team as a code owner September 16, 2019 16:42
Copy link
Contributor

@notmgsk notmgsk left a comment

Choose a reason for hiding this comment

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

Strange. But you gotta do what you gotta do.

@appleby
Copy link
Contributor Author

appleby commented Sep 16, 2019

Strange. But you gotta do what you gotta do.

Indeed. mypy also seems to be confused by rpcq's use of ruamel.yaml, claiming it can't find the package even though ruamel includes a py.typed file. Maybe because ruamel is a "namespace" package? 🤷‍♂ Haven't managed to track it down yet. Weirdly, running mypy from the rpcq directory doesn't complain about missing ruamel, but running from pyquil, which only transitively depends on ruamel via rpcq, dumps tons of warnings about it.

@stylewarning
Copy link
Contributor

eye_roll.jpg

@stylewarning stylewarning merged commit bd0ae49 into master Sep 16, 2019
@stylewarning stylewarning deleted the pep-561-py-typed branch September 16, 2019 23:23
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.

4 participants