Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Open
tharvik wants to merge 5 commits into
googleapis:maingoogleapis/google-cloud-python:mainfrom
tharvik:maintharvik/google-cloud-python:mainCopy head branch name to clipboard
Open

feat: add more types to google.cloud.firestore.BaseDocumentReference#16503
tharvik wants to merge 5 commits into
googleapis:maingoogleapis/google-cloud-python:mainfrom
tharvik:maintharvik/google-cloud-python:mainCopy head branch name to clipboard

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.