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

feat: Add py.typed for PEP 561 compliance #976

Merged
merged 1 commit into from Sep 20, 2021
Merged

Conversation

@jdufresne
Copy link
Contributor

@jdufresne jdufresne commented Sep 19, 2021

Type annotations were added in commit
f8d4aaa. For these annotations to be
useful by library users, the package should install a py.typed file.
This tells mypy and other tools to consume and use these types.

For more details, see:
https://mypy.readthedocs.io/en/stable/installed_packages.html#creating-pep-561-compatible-packages

@google-cla
Copy link

@google-cla google-cla bot commented Sep 19, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

Loading

@google-cla google-cla bot added the cla: no label Sep 19, 2021
@jdufresne
Copy link
Contributor Author

@jdufresne jdufresne commented Sep 19, 2021

Is the CLA required for something so trivial?

Loading

@plamut
Copy link
Contributor

@plamut plamut commented Sep 19, 2021

@jdufresne Thank you for your contribution!

CLA is required, yes, regardless of the contribution size, otherwise the bot will not allow to merge a PR.

Loading

@jdufresne
Copy link
Contributor Author

@jdufresne jdufresne commented Sep 19, 2021

@googlebot I signed it!

Loading

@google-cla google-cla bot added cla: yes and removed cla: no labels Sep 19, 2021
@jdufresne jdufresne changed the title Add py.typed for PEP 561 compliance feat: Add py.typed for PEP 561 compliance Sep 19, 2021
@plamut
Copy link
Contributor

@plamut plamut commented Sep 20, 2021

FWIW, that failed system test is known flakiness.

@tswast We now actually have the job ID in the logs to investigate, I have shared it with you privately.

Loading

Copy link
Contributor

@plamut plamut left a comment

I would just suggest putting the following content in the py.typed file for consistency, similarly to bigquery_v2/py.typed and py.typed files in other Python client libraries:

# Marker file for PEP 561.
# The google-cloud-bigquery package uses inline types.

Loading

Type annotations were added in commit
f8d4aaa. For these annotations to be
useful by library users, the package should install a py.typed file.
This tells mypy and other tools to consume and use these types.

For more details, see:
https://mypy.readthedocs.io/en/stable/installed_packages.html#creating-pep-561-compatible-packages
@jdufresne
Copy link
Contributor Author

@jdufresne jdufresne commented Sep 20, 2021

@plamut Thanks for the review. I've applied the suggestion to the latest revision.

Loading

plamut
plamut approved these changes Sep 20, 2021
Copy link
Contributor

@plamut plamut left a comment

Looks good as far as I'm concerned. And thanks again!

Loading

tswast
tswast approved these changes Sep 20, 2021
@tswast tswast merged commit 96e6bee into googleapis:main Sep 20, 2021
12 checks passed
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants