feat: add more types to `google.cloud.firestore.BaseDocumentReference` by tharvik · Pull Request #16503 · googleapis/google-cloud-python

Code Review

This pull request implements comprehensive type hinting for Firestore document references, making BaseDocumentReference generic to support both sync and async clients and adding explicit None checks for the client across various methods. Review feedback suggests refining these checks by moving them before path access to prevent AttributeError, using more descriptive error messages for retrieval operations, and adopting more idiomatic Python patterns such as using tuples for hashing and programmatically sorting dictionary keys.