Iterating `StreamGenerator` in a for loop yields type `Unknown`. In the code example, it should yield `DocumentSnapshot`. This can be fixed by changing `StreamGenerator.__iter__` ’s return type from `StreamGenerator` to `StreamGenerator[T]`. https://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/stream_generator.py#L53-L54 #### Environment details - OS type and version: Windows 11 - Python version: 3.9.13 - pip version: uv-pip 0.6.12 - `google-cloud-firestore` version: 2.21.0 #### Steps to reproduce 1. Setup environment as above 2. Check the type shown by the IDE #### Code example ```python db: Client docs = db.collection("some_table").stream() for doc in docs: pass ``` <img width="601" height="123" alt="Image" src="https://github.com/user-attachments/assets/e25fb376-b31c-4269-a1dc-42363943aff9" /> <img width="442" height="137" alt="Image" src="https://github.com/user-attachments/assets/e3c31917-cdec-486e-a091-915a16fae76e" />
Iterating
StreamGeneratorin a for loop yields typeUnknown.In the code example, it should yield
DocumentSnapshot.This can be fixed by changing
StreamGenerator.__iter__’s return type fromStreamGeneratortoStreamGenerator[T].python-firestore/google/cloud/firestore_v1/stream_generator.py
Lines 53 to 54 in 4983639
Environment details
google-cloud-firestoreversion: 2.21.0Steps to reproduce
Code example