[FR] Add return type annotations for public functions (firestore.client(), storage.bucket(), etc)
@mohitCodepy がすでに取り組んでいます。
2023年3月13日 から。
評価
この issue はまだ評価されていません。
説明
Is your feature request related to a problem? Please describe.
VSCode can use Python type annotations to provide a much better experience, and allow completion.
Describe the solution you'd like
function signatures should return a return type, to allow completions. For example, in firestore.py
def client() -> google.cloud.firestore.Client would allow completion on client().collection("something"), etc.
Describe alternatives you've considered
As a workaround, I'm using the following today:
from firebase_admin import firestore
from google.cloud.firestore import Client as FirestoreClient # importing the return type of firestore.client()
db: FirestoreClient = firestore.client() # Adding an annotation to my db variable, to enable completion and syntax checking
Additional context
Using the latest VSCode, with the Pylance extension.
- 主要言語
- Python
- スター
- 1.2k
- フォーク
- 359
- 平均マージ
- 3日 9時間
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firebase/firebase-admin-python のほかの issue
-
api: remoteconfig
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
firebase/firebase-admin-python#957 · コメント 1 件 ·
-
api: database type: feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
firebase/firebase-admin-python#978 · コメント 1 件 ·
-
[FR] Support VERIFY_AND_CHANGE_EMAIL in generate_email_action_link (parity with firebase-admin-node) オープンapi: auth
firebase/firebase-admin-python#949 · コメント 2 件 · リアクション 1 件 · 担当者 1 名 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 43/100
firebase/firebase-admin-python#945 · コメント 1 件 · リアクション 1 件 ·
firebase/firebase-admin-python の issue をすべて見る
似ている issue
-
essnmx good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
[Feature] 奇物选择添加优先级 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
syfoud/Simulated_Scepter#174 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Giskard-AI/giskard-oss#2840 · コメント 1 件 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success オープンarea: repo bug perceived difficulty: 2
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
yeti-platform/yeti#1380 ·