Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

Pylance is not satisfied with the typings #570

Description

@NixBiks

I'm using VSCode with pylance (as I think most python developers do).

If I use the async example from the docs then I'm getting a type error

Argument of type "Literal[_MethodDefault._DEFAULT_VALUE]" cannot be assigned to parameter "retry" of type "Retry" in function "get"
  "Literal[_MethodDefault._DEFAULT_VALUE]" is incompatible with "Retry" Pylance(reportGeneralTypeIssues)

Environment details

  • OS type and version: macOS 12.3.1
  • Python version: 3.9.9
  • pip version: 22.04
  • google-cloud-firestore version: 2.4.0

Steps to reproduce

Create example from docs

from google.cloud import firestore


async def abc():
    db = firestore.AsyncClient()
    doc_ref = db.collection("cities").document("SF")

    doc = await doc_ref.get()
    if doc.exists:
        print(f"Document data: {doc.to_dict()}")
    else:
        print("No such document!")

Let me know if you need more information

Screenshot 2022-04-23 at 15 59 02

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: firestoreIssues related to the googleapis/python-firestore API.priority: p2Moderately-important priority. Fix may not be included in next release.type: cleanupAn internal cleanup or hygiene concern.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions