You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Thank you @guneemwelloeux for filing this feature request. We have started adding type hints to new code (ex: #621) and will eventually add type hints to existing code in the future. In the meantime, if you or anyone in the community would like to send a PR we are glad to take a look. Thank you!
@lahirumaramba , Just for more clearity on the issue, Is there any way where I can connect with you guys directly because I'm highly interested to contribute here?
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:
Additional context
Using the latest VSCode, with the Pylance extension.
The text was updated successfully, but these errors were encountered: