René's URL Explorer Experiment


Title: Type Mismatch DocumentSnapshot of AsyncCollectionReference · Issue #15367 · googleapis/google-cloud-python · GitHub

Open Graph Title: Type Mismatch DocumentSnapshot of AsyncCollectionReference · Issue #15367 · googleapis/google-cloud-python

X Title: Type Mismatch DocumentSnapshot of AsyncCollectionReference · Issue #15367 · googleapis/google-cloud-python

Description: Environment details OS type and version: MacOS Sequoia 15.6 Python version: 3.13.5 pip version 25.1.1 google-cloud-firestore version: 2.21.0 Description There's a type inconsistency between the IDE's type hints and the actual returned ty...

Open Graph Description: Environment details OS type and version: MacOS Sequoia 15.6 Python version: 3.13.5 pip version 25.1.1 google-cloud-firestore version: 2.21.0 Description There's a type inconsistency between the IDE...

X Description: Environment details OS type and version: MacOS Sequoia 15.6 Python version: 3.13.5 pip version 25.1.1 google-cloud-firestore version: 2.21.0 Description There's a type inconsistency between the...

Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/15367

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Type Mismatch DocumentSnapshot of AsyncCollectionReference","articleBody":"\n#### Environment details\n\n  - OS type and version: MacOS Sequoia 15.6\n  - Python version: 3.13.5\n  - pip version 25.1.1\n  - `google-cloud-firestore` version:  2.21.0\n\n#### Description\nThere's a type inconsistency between the IDE's type hints and the actual returned types when working with Firestore's AsyncClient.\n\n#### Steps to reproduce\n\n  1. Initialize async client\n  2. Make a query on a collection\n  3. fetch query data using `await query.get()`\n  4. the IDE suggest the return type of `google.cloud.firestore_v1.query_results.QueryResultsList[DocumentSnapshot]`\n  5. call `.reference` on any object of the query, the IDE will suggest that the return type would be `google.cloud.firestore_v1.base_document.DocumentSnapshot`\n  6. in reality the document returned is `google.cloud.firestore_v1.async_document.AsyncDocumentReference`\n\n#### Code example\n\n```python\nimport firebase_admin\nfirebase_admin.initialize_app()\naclient = firestore_async.firestore.AsyncClient(database=\"(default)\")\nusers = await aclient.collection(\"users\").get()\nprint(type(users[0]))\n# \u003cclass 'google.cloud.firestore_v1.base_document.DocumentSnapshot'>\nprint(type(users[0].reference))  # Mismatch between type hint and actual type. see the references \n# \u003cclass 'google.cloud.firestore_v1.async_document.AsyncDocumentReference'>\n```\n##### references\nhttps://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/async_collection.py#L199-L244\nhttps://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/async_collection.py#L72-L78\nhttps://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/async_collection.py#L199-L244\nhttps://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/async_query.py#L189-L263\nhttps://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/base_document.py#L441-L449\nhttps://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/async_collection.py#L246-L254\n\n","author":{"url":"https://github.com/UmarFarooq-Ch","@type":"Person","name":"UmarFarooq-Ch"},"datePublished":"2025-08-04T10:17:49Z","url":"https://github.com/googleapis/google-cloud-python/issues/15367"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:5dd7d78f-31a2-7795-0d4e-8c047a33c0a9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDBA4:24FA46:136067:1A24CB:6AFE3596
html-safe-nonceb4705e10c22c7f2aeb1dd16191904c62d99f5a22eaff9706c47e84fd40ce74db
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQkE0OjI0RkE0NjoxMzYwNjc6MUEyNENCOjZBRkUzNTk2IiwidmlzaXRvcl9pZCI6Ijg2ODgxMzI4MTkwODUzMDkzMzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7c5120d30cef846b1fe8738f3ec4cd802131d11bdf64b50081b59b7cbf6c9cea
hovercard-subject-tagissue:3809677840
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/15367/issue_layout
twitter:imagehttps://opengraph.githubassets.com/358dc926424d6db7c42b5bf9ba524f85f3f28f59b783b4c35e16666bb9870c7e/googleapis/google-cloud-python/issues/15367
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/358dc926424d6db7c42b5bf9ba524f85f3f28f59b783b4c35e16666bb9870c7e/googleapis/google-cloud-python/issues/15367
og:image:altEnvironment details OS type and version: MacOS Sequoia 15.6 Python version: 3.13.5 pip version 25.1.1 google-cloud-firestore version: 2.21.0 Description There's a type inconsistency between the IDE...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameUmarFarooq-Ch
hostnamegithub.com
expected-hostnamegithub.com
None260deedcf4630abb0a6b4aaa02fd2af70eab44d2529712694ceae59ca131b02e
turbo-cache-controlno-preview
go-importgithub.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git
octolytics-dimension-user_id16785467
octolytics-dimension-user_logingoogleapis
octolytics-dimension-repository_id16316451
octolytics-dimension-repository_nwogoogleapis/google-cloud-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id16316451
octolytics-dimension-repository_network_root_nwogoogleapis/google-cloud-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8b413ea7a9b010f4f2ebbb923b041b0d6091dd94
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/googleapis/google-cloud-python/issues/15367#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fgoogle-cloud-python%2Fissues%2F15367
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fgoogle-cloud-python%2Fissues%2F15367
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=googleapis%2Fgoogle-cloud-python
Reloadhttps://github.com/googleapis/google-cloud-python/issues/15367
Reloadhttps://github.com/googleapis/google-cloud-python/issues/15367
Reloadhttps://github.com/googleapis/google-cloud-python/issues/15367
googleapishttps://github.com/googleapis
google-cloud-pythonhttps://github.com/googleapis/google-cloud-python
Codehttps://github.com/googleapis/google-cloud-python
Issues449 (449)https://github.com/googleapis/google-cloud-python/issues
Pull requests199 (199)https://github.com/googleapis/google-cloud-python/pulls
Discussionshttps://github.com/googleapis/google-cloud-python/discussions
Actionshttps://github.com/googleapis/google-cloud-python/actions
Projectshttps://github.com/googleapis/google-cloud-python/projects
Security and qualityhttps://github.com/googleapis/google-cloud-python/security
Insightshttps://github.com/googleapis/google-cloud-python/insights
https://github.com/googleapis/google-cloud-python
New issuehttps://github.com/login?return_to=https://github.com/googleapis/google-cloud-python/issues/15367
New issuehttps://github.com/login?return_to=https://github.com/googleapis/google-cloud-python/issues/15367
#18587https://github.com/googleapis/google-cloud-python/pull/18587
Type Mismatch DocumentSnapshot of AsyncCollectionReferencehttps://github.com/googleapis/google-cloud-python/issues/15367#top
#18587https://github.com/googleapis/google-cloud-python/pull/18587
https://github.com/daniel-sanche
api: firestoreIssues related to the Firestore API.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22api%3A%20firestore%22
priority: p3Desirable enhancement or fix. May not be included in next release.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22priority%3A%20p3%22
https://github.com/UmarFarooq-Ch
UmarFarooq-Chhttps://github.com/UmarFarooq-Ch
on Aug 4, 2025https://github.com/googleapis/google-cloud-python/issues/15367#issue-3809677840
https://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/async_collection.py#L199-L244https://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/async_collection.py#L199-L244
https://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/async_collection.py#L72-L78https://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/async_collection.py#L72-L78
https://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/async_collection.py#L199-L244https://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/async_collection.py#L199-L244
https://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/async_query.py#L189-L263https://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/async_query.py#L189-L263
https://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/base_document.py#L441-L449https://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/base_document.py#L441-L449
https://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/async_collection.py#L246-L254https://github.com/googleapis/python-firestore/blob/49836391dc712bd482781a26ccd3c8a8408c473b/google/cloud/firestore_v1/async_collection.py#L246-L254
product-auto-labelhttps://github.com/apps/product-auto-label
api: firestoreIssues related to the Firestore API.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22api%3A%20firestore%22
on Aug 4, 2025https://github.com/googleapis/google-cloud-python/issues/15367#event-22022011417
blunderbuss-gcfhttps://github.com/apps/blunderbuss-gcf
rafikhanhttps://github.com/rafikhan
on Aug 4, 2025https://github.com/googleapis/google-cloud-python/issues/15367#event-22022011447
ehsannashttps://github.com/ehsannas
daniel-sanchehttps://github.com/daniel-sanche
rafikhanhttps://github.com/rafikhan
on Aug 6, 2025https://github.com/googleapis/google-cloud-python/issues/15367#event-22022011498
https://github.com/daniel-sanche
daniel-sanchehttps://github.com/daniel-sanche
on Oct 31, 2025https://github.com/googleapis/google-cloud-python/issues/15367#issuecomment-3745336309
in snapshot.referencehttps://github.com/googleapis/python-firestore/blob/65d9d16535b2007676e9fd928f08d7d5b4e9234f/google/cloud/firestore_v1/base_document.py#L442
https://github.com/parthea
partheahttps://github.com/parthea
on Jan 13, 2026https://github.com/googleapis/google-cloud-python/issues/15367#issuecomment-3745336334
partheahttps://github.com/parthea
googleapis/python-firestorehttps://github.com/googleapis/python-firestore
on Jan 13, 2026https://github.com/googleapis/google-cloud-python/issues/15367#event-22022011888
daniel-sanchehttps://github.com/daniel-sanche
priority: p3Desirable enhancement or fix. May not be included in next release.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22priority%3A%20p3%22
on Apr 11, 2026https://github.com/googleapis/google-cloud-python/issues/15367#event-24398983854
https://github.com/daniel-sanche
daniel-sanchehttps://github.com/daniel-sanche
on Oct 7, 2026https://github.com/googleapis/google-cloud-python/issues/15367#issuecomment-6028729459
#18587https://github.com/googleapis/google-cloud-python/pull/18587
daniel-sanchehttps://github.com/daniel-sanche
completedhttps://github.com/googleapis/google-cloud-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#18587https://github.com/googleapis/google-cloud-python/pull/18587
on Oct 7, 2026https://github.com/googleapis/google-cloud-python/issues/15367#event-32727465628
renovate-bothttps://github.com/renovate-bot
on Oct 7, 2026https://github.com/googleapis/google-cloud-python/issues/15367#event-32727581535
fix(firestore): add generic typing for DocumentSnapshot (googleapis#1…https://github.com/renovate-bot/google-cloud-python/commit/947949ba602195eaf93aa55e26cb33b95e1461f4
googleapis#1…https://github.com/googleapis/google-cloud-python/pull/18587
947949bhttps://github.com/renovate-bot/google-cloud-python/commit/947949ba602195eaf93aa55e26cb33b95e1461f4
Sign up for freehttps://github.com/signup?return_to=https://github.com/googleapis/google-cloud-python/issues/15367
Sign in to commenthttps://github.com/login?return_to=https://github.com/googleapis/google-cloud-python/issues/15367
daniel-sanchehttps://github.com/daniel-sanche
api: firestoreIssues related to the Firestore API.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22api%3A%20firestore%22
priority: p3Desirable enhancement or fix. May not be included in next release.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22priority%3A%20p3%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.