Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[FR] Add return type annotations for public functions (firestore.client(), storage.bucket(), etc)

Aperta
#626 5 commenti 5 reazioni 1 assegnatario Vedi su GitHub

@mohitCodepy ci sta già lavorando.

Dal 13/3/2023.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

api: core help wanted type: feature request

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.

Lingua principale
Python
Stelle
1.2k
Fork
359
Merge medio
3g 9h
PR unite (30g)
3

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di firebase/firebase-admin-python

Tutte le issue di firebase/firebase-admin-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.