Skip to content

type issue: "StreamGenerator" is not iterable #947

@shooit

Description

@shooit

This issue was introduced with the changes in 2.17.0. It exists for each of the pyright version I tested at random.

It is only a type issue -- the code behaves as expected.

Environment details

  • OS type and version: MacOS
  • Python version: python --version 3.11.7
  • pip version: pip --version poetry
  • google-cloud-firestore version: pip show google-cloud-firestore 2.17.0
  • pyright version: 1.1.375

Steps to reproduce

  1. Setup environment as above
  2. Run pyright

Code example

client = firestore_v1.Client()


def example():
    collection = client.collection("foo")
    docs = collection.stream()
    for doc in docs:
        print(doc)
image

Error message

eample.py
  example.py:7:20 - error: "StreamGenerator" is not iterable
    "__next__" method not defined on type "DocumentSnapshot" (reportGeneralTypeIssues)

Metadata

Metadata

Labels

api: firestoreIssues related to the googleapis/python-firestore API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions