googleapis / googleapis/google-cloud-python

Make __all__ expose classes for use in type annotations

オープン
#15,640 コメント 1 件 リアクション 0 件 担当者 1 名 @abbrowne126 が担当を希望しています GitHub で見る
api: pubsub type: feature request
主要言語
Python
スター
5.4k
フォーク
1.8k
平均マージ
3日 4時間
マージ済み PR(30日)
122

説明

**Is your feature request related to a problem? Please describe.**
I would like to type annotate my Pubsub subscriber callback as:
`callable[[pubsub_v1.subscriber.message.Message], None]` to match the callback function signature described here: https://cloud.google.com/pubsub/docs/publish-receive-messages-client-library

However, when I do this, my IDE (PyCharm) complains saying: `Cannot find reference 'message' in '__init__.py'`

This is because `pubsub_v1.subscriber.__init__.py` only has `__all__ = ("Client",)`, meaning this is all that is suggested as an exported value.

**Describe the solution you'd like**
Expose the `pubsub_v1.subscriber.message.Message` in `__all__` so I can add type annotations. I expect there are other types that it would be helpful to expose here too.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。