googleapis / googleapis/google-cloud-python

Include mypy types / add py.typed

未关闭
#13,362 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
priority: p3 type: feature request
主要语言
Python
星标
5.4k
派生
1.8k
平均合并
3 天 4 小时
30 天内合并 PR
122

描述

**Is your feature request related to a problem? Please describe.**

Modern python can be type-checked using mypy, but the python distribution of this package does not include the type specs, nor is there a companion type package.

**Describe the solution you'd like**

Types generated using e.g. https://pypi.org/project/mypy-protobuf/ included either directly in the python googleapis-common-protos package or a separate googleapis-common-protos-stubs package. A separate stubs package might help with avoiding accidental breakage.

**Describe alternatives you've considered**

I could check in the googleapi protos into the repository where I'm using them and add codegen from that.

**Additional context**
For the grpcio packages, there's stubs maintained by a third-party, https://pypi.org/project/grpc-stubs/. The protoc plugin https://pypi.org/project/mypy-protobuf/ codegens stubs for proto files (messages and grpc clients/handlers).

These packages need py.typed

- [ ] google-cloud-access-context-manager
- [ ] google-cloud-audit-log
- [ ] googleapis-common-protos
- [ ] grpc-google-iam-v1

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。