Skip to content

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

Open
tharvik wants to merge 5 commits intogoogleapis:mainfrom
tharvik:main
Open

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

Conversation

@tharvik
Copy link
Copy Markdown

@tharvik tharvik commented Apr 1, 2026

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
Copy link
Copy Markdown
Contributor

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

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.

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