Skip to content

feat: add more types to google.cloud.firestore.BaseDocumentReference - #16503

Open
tharvik wants to merge 5 commits into
googleapis:mainfrom
tharvik:main
Open

feat: add more types to google.cloud.firestore.BaseDocumentReference#16503
tharvik wants to merge 5 commits into
googleapis:mainfrom
tharvik:main

Conversation

@tharvik

@tharvik tharvik commented Apr 1, 2026

Copy link
Copy Markdown

Fixes #16502 🦕

also:

  • raise when BaseDocumentReference.client is used w/o checking for None
  • use references correctly in BulkWriter

@tharvik
tharvik requested review from a team as code owners April 1, 2026 11:53
@tharvik tharvik changed the title add more types to google.cloud.firestore.BaseDocumentReference feat: add more types to google.cloud.firestore.BaseDocumentReference Apr 1, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/google-cloud-firestore/google/cloud/firestore_v1/base_document.py Outdated
Comment thread packages/google-cloud-firestore/google/cloud/firestore_v1/base_document.py Outdated
@tharvik

tharvik commented May 7, 2026

Copy link
Copy Markdown
Author

well, anything I can do to move things along?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add more types to google.cloud.firestore.BaseDocumentReference

1 participant