-
Notifications
You must be signed in to change notification settings - Fork 44
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 submodule #240
Comments
Reopening as to be done, we ought to ensure passage. Do note, you may need to run mypy, pyright, pytype against our samples before merging. It will ensure that we aren't exposing users to failing type checks. Ideally we would add this to CI as well, to avoid future breakage. |
TODO: We want to evaluate mypy against google and tests Once https://www.github.com/googleapis/gapic-generator-python/issues/1026 is addressed, we should be unblocked to wrap this up. |
I have a WIP locally which passes. $ .nox/mypy/bin/mypy google/ tests
Success: no issues found in 66 source files In addition to tweaking
However, there is another issue which is un-addressed by those PRs: the generated code for the $ .nox/mypy/bin/mypy google/
google/cloud/datastore_admin_v1/services/datastore_admin/client.py:384: error: Name "datastore_admin.ExportEntitiesRequest.LabelsEntry" is not defined
google/cloud/datastore_admin_v1/services/datastore_admin/client.py:523: error: Name "datastore_admin.ImportEntitiesRequest.LabelsEntry" is not defined
google/cloud/datastore_admin_v1/services/datastore_admin/async_client.py:209: error: Name "datastore_admin.ExportEntitiesRequest.LabelsEntry" is not defined
google/cloud/datastore_admin_v1/services/datastore_admin/async_client.py:347: error: Name "datastore_admin.ImportEntitiesRequest.LabelsEntry" is not defined By my reading of the protobuf definition, those parameters should be typed as |
The |
To be in accordance with PEP 561 we should add a py.typed file to google/cloud/datastore/py.typed
The file can be empty but does need to be present for some type checkers.
The text was updated successfully, but these errors were encountered: