René's URL Explorer Experiment


Title: google.cloud.ndb stubs incorrect argument for various validators · Issue #7103 · python/typeshed · GitHub

Open Graph Title: google.cloud.ndb stubs incorrect argument for various validators · Issue #7103 · python/typeshed

X Title: google.cloud.ndb stubs incorrect argument for various validators · Issue #7103 · python/typeshed

Description: I have some code using google.cloud.ndb that has started failing pytype checks. The core of it is: from google.cloud import ndb def validate_url(prop, value): # some assert on value return value def validate_jqqb(prop, value): # some ret...

Open Graph Description: I have some code using google.cloud.ndb that has started failing pytype checks. The core of it is: from google.cloud import ndb def validate_url(prop, value): # some assert on value return value de...

X Description: I have some code using google.cloud.ndb that has started failing pytype checks. The core of it is: from google.cloud import ndb def validate_url(prop, value): # some assert on value return value de...

Opengraph URL: https://github.com/python/typeshed/issues/7103

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"google.cloud.ndb stubs incorrect argument for various validators","articleBody":"I have [some code](https://github.com/davidn/filter-feed/blob/9f6e616c9c39667a0b421358ef498d4bc1617c2d/filter_feed.py) using `google.cloud.ndb` that has started failing pytype checks. The core of it is:\r\n\r\n```py\r\nfrom google.cloud import ndb\r\n\r\ndef validate_url(prop, value):\r\n    # some assert on value\r\n    return value\r\n\r\ndef validate_jqqb(prop, value):\r\n    # some \r\n    return value\r\n\r\nclass FilterFeed(ndb.Model):\r\n    url = ndb.StringProperty(required=True, validator=validate_url)\r\n    query_builder = ndb.JsonProperty(required=True, validator=validate_jqqb)\r\n```\r\n\r\nSince last year, this started failing pytype with error:\r\n\r\n```\r\nFile \"/home/david/Projects/filter-feed/filter_feed.py\", line 19, in FilterFeed: Function JsonProperty.__init__ was called with the wrong arguments [wrong-arg-types]\r\n         Expected: (self, name, compressed, json_type, indexed, repeated, required, default, choices, validator: Optional[Callable[[google.cloud.ndb.model.Property], object]] = ..., ...)\r\n  Actually passed: (self, required, validator: Callable[[Any, Any], Any])\r\n\r\nFor more details, see https://google.github.io/pytype/errors.html#wrong-arg-types\r\nninja: build stopped: subcommand failed.\r\n```\r\n\r\nThis appears to be because #5821 introduced [an ndb stub](https://github.com/python/typeshed/blob/master/stubs/google-cloud-ndb/google/cloud/ndb/model.pyi) that defines validators as `Callable[[Property], object]` while [upstream](https://github.com/googleapis/python-ndb/blob/main/google/cloud/ndb/model.py) defines it as `Callable[[~google.cloud.ndb.model.Property, Any], bool]` in docstrings.","author":{"url":"https://github.com/davidn","@type":"Person","name":"davidn"},"datePublished":"2022-02-02T04:59:37Z","url":"https://github.com/python/typeshed/issues/7103"}

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:b4145ad4-d3e0-dec7-71b3-38451ea4bf85
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAD5C:30263F:2521222:32985F8:6B0038CD
html-safe-nonce519c3e9095f97fae94e6cf7ee125b66ae1e3a2b7f072c29ede4336a550703e38
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDVDOjMwMjYzRjoyNTIxMjIyOjMyOTg1Rjg6NkIwMDM4Q0QiLCJ2aXNpdG9yX2lkIjoiNDI5MDM2MzE0MDA5ODUwNDkwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb0923dcf658e2594efe21a1603c0ee96036c4abf9ee9d93e6abfce79cd23201b
hovercard-subject-tagissue:1121512088
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/python/typeshed/7103/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e85ddc89b9ff294e28a275cf4c3a419f48b6c49042c6b90809b94bf75d98307e/python/typeshed/issues/7103
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e85ddc89b9ff294e28a275cf4c3a419f48b6c49042c6b90809b94bf75d98307e/python/typeshed/issues/7103
og:image:altI have some code using google.cloud.ndb that has started failing pytype checks. The core of it is: from google.cloud import ndb def validate_url(prop, value): # some assert on value return value de...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedavidn
hostnamegithub.com
expected-hostnamegithub.com
None7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0
turbo-cache-controlno-preview
go-importgithub.com/python/typeshed git https://github.com/python/typeshed.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id31696383
octolytics-dimension-repository_nwopython/typeshed
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31696383
octolytics-dimension-repository_network_root_nwopython/typeshed
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
releasef3f3a43ca095cdea3abbb394112e971f9fdb94fa
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/typeshed/issues/7103#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fissues%2F7103
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%2Fpython%2Ftypeshed%2Fissues%2F7103
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=python%2Ftypeshed
Reloadhttps://github.com/python/typeshed/issues/7103
Reloadhttps://github.com/python/typeshed/issues/7103
Reloadhttps://github.com/python/typeshed/issues/7103
pythonhttps://github.com/python
typeshedhttps://github.com/python/typeshed
Codehttps://github.com/python/typeshed
Issues196 (196)https://github.com/python/typeshed/issues
Pull requests252 (252)https://github.com/python/typeshed/pulls
Actionshttps://github.com/python/typeshed/actions
Security and qualityhttps://github.com/python/typeshed/security
Insightshttps://github.com/python/typeshed/insights
https://github.com/python/typeshed
New issuehttps://github.com/login?return_to=https://github.com/python/typeshed/issues/7103
New issuehttps://github.com/login?return_to=https://github.com/python/typeshed/issues/7103
#7120https://github.com/python/typeshed/pull/7120
google.cloud.ndb stubs incorrect argument for various validatorshttps://github.com/python/typeshed/issues/7103#top
#7120https://github.com/python/typeshed/pull/7120
stubs: false positiveType checkers report false errorshttps://github.com/python/typeshed/issues?q=state%3Aopen%20label%3A%22stubs%3A%20false%20positive%22
https://github.com/davidn
davidnhttps://github.com/davidn
on Feb 2, 2022https://github.com/python/typeshed/issues/7103#issue-1121512088
some codehttps://github.com/davidn/filter-feed/blob/9f6e616c9c39667a0b421358ef498d4bc1617c2d/filter_feed.py
#5821https://github.com/python/typeshed/pull/5821
an ndb stubhttps://github.com/python/typeshed/blob/master/stubs/google-cloud-ndb/google/cloud/ndb/model.pyi
upstreamhttps://github.com/googleapis/python-ndb/blob/main/google/cloud/ndb/model.py
davidnhttps://github.com/davidn
on Feb 2, 2022https://github.com/python/typeshed/issues/7103#event-5993187161
Add second parameter to property validatorshttps://github.com/davidn/typeshed/commit/176d06db494940c3c4e418365344492b4f655f0a
https://docs.github.com/articles/closing-issues-via-commit-messages
176d06dhttps://github.com/davidn/typeshed/commit/176d06db494940c3c4e418365344492b4f655f0a
Supress pytype errorhttps://github.com/davidn/filter-feed/commit/a9ff7dca033fc70bc8f503e977ea2151d06333da
https://docs.github.com/articles/closing-issues-via-commit-messages
a9ff7dchttps://github.com/davidn/filter-feed/commit/a9ff7dca033fc70bc8f503e977ea2151d06333da
https://github.com/davidn
davidnhttps://github.com/davidn
on Feb 2, 2022https://github.com/python/typeshed/issues/7103#issuecomment-1027595111
davidnhttps://github.com/davidn
on Feb 2, 2022https://github.com/python/typeshed/issues/7103#event-5993279522
Fully disable pytype for ndbhttps://github.com/davidn/filter-feed/commit/f6b161e87a114efa4438f9db6c1682a46dfcdccd
f6b161ehttps://github.com/davidn/filter-feed/commit/f6b161e87a114efa4438f9db6c1682a46dfcdccd
https://github.com/srittau
srittauhttps://github.com/srittau
on Feb 2, 2022https://github.com/python/typeshed/issues/7103#issuecomment-1027843204
@romanofskihttps://github.com/romanofski
srittauhttps://github.com/srittau
stubs: false positiveType checkers report false errorshttps://github.com/python/typeshed/issues?q=state%3Aopen%20label%3A%22stubs%3A%20false%20positive%22
on Feb 2, 2022https://github.com/python/typeshed/issues/7103#event-5995063357
https://github.com/romanofski
romanofskihttps://github.com/romanofski
on Feb 2, 2022https://github.com/python/typeshed/issues/7103#issuecomment-1028368197
@srittauhttps://github.com/srittau
@davidnhttps://github.com/davidn
romanofskihttps://github.com/romanofski
on Feb 2, 2022https://github.com/python/typeshed/issues/7103#event-5998939844
Fix incorrect type definition for `validator`https://github.com/romanofski/typeshed/commit/c5d329720098dc732b1723c25be987250b62d19f
c5d3297https://github.com/romanofski/typeshed/commit/c5d329720098dc732b1723c25be987250b62d19f
https://github.com/romanofski
romanofskihttps://github.com/romanofski
on Feb 2, 2022https://github.com/python/typeshed/issues/7103#issuecomment-1028424987
#7116https://github.com/python/typeshed/pull/7116
romanofskihttps://github.com/romanofski
on Feb 2, 2022https://github.com/python/typeshed/issues/7103#event-5999146293
Fix mistyped `get_by_id` class methodshttps://github.com/romanofski/typeshed/commit/5959751fbc1a5b4a61dcfa126e2a319c18c7f93e
https://docs.github.com/articles/closing-issues-via-commit-messages
5959751https://github.com/romanofski/typeshed/commit/5959751fbc1a5b4a61dcfa126e2a319c18c7f93e
JelleZijlstrahttps://github.com/JelleZijlstra
completedhttps://github.com/python/typeshed/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#7120https://github.com/python/typeshed/pull/7120
on Feb 2, 2022https://github.com/python/typeshed/issues/7103#event-5999364213
JelleZijlstrahttps://github.com/JelleZijlstra
on Feb 2, 2022https://github.com/python/typeshed/issues/7103#event-5999364402
Fix mistyped `get_by_id` class methods (#7120)https://github.com/python/typeshed/commit/fc60d02c3ea5ca006d0e8244c556f48d697a7c66
#7120https://github.com/python/typeshed/pull/7120
https://docs.github.com/articles/closing-issues-via-commit-messages
fc60d02https://github.com/python/typeshed/commit/fc60d02c3ea5ca006d0e8244c556f48d697a7c66
google-cloud-ndb: Fix incorrect type definition for `validator` (#7116)https://github.com/python/typeshed/commit/2381066c1540705bec8552951b09e7fbbe443481
#7116https://github.com/python/typeshed/pull/7116
https://docs.github.com/articles/closing-issues-via-commit-messages
2381066https://github.com/python/typeshed/commit/2381066c1540705bec8552951b09e7fbbe443481
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/typeshed/issues/7103
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/typeshed/issues/7103
stubs: false positiveType checkers report false errorshttps://github.com/python/typeshed/issues?q=state%3Aopen%20label%3A%22stubs%3A%20false%20positive%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.