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
{{ message }}
This repository was archived by the owner on Aug 30, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 30, 2026. It is now read-only.
inconsistent type annotations for Document.on_snapshot #26
The claim is that the callback invoked by on_snapshot should have type signature Callable[[:class:~google.cloud.firestore.document.DocumentSnapshot], NoneType]. however, just a few lines lower, in the example, it looks like the callback receives three arguments:
it looks like there are indeed three arguments passed. appliedChanges appears to be a List[DocumentChange], and the final argument seems to be a datetime.datetime instance. but the first argument... is the result of calling keys() on a document_tree (here:
) and so maybe is a List[str] ? the self.doc_tree is an instance of WatchDocTree and it's keys() method returns the underlying dict's keys. are those keys actually DocumentSnapshot instances? it maybe sort of seems like it, after tracing through the code a bunch. i'm guessing that the correct type signature for the callback is:
Activity
HemangChothani commentedon Jul 15, 2020
Closing as resolved by #79 PR