René's URL Explorer Experiment


Title: Tests specifically for tricky, white-lie signatures · Issue #1339 · python/typeshed · GitHub

Open Graph Title: Tests specifically for tricky, white-lie signatures · Issue #1339 · python/typeshed

X Title: Tests specifically for tricky, white-lie signatures · Issue #1339 · python/typeshed

Description: We've had some useful, long discussions about writing tests for stubs (#754, #917). Most of the discussion has been around having tests for the bulk of the functionality in stubs and the libraries they describe. I think we're all broadly...

Open Graph Description: We've had some useful, long discussions about writing tests for stubs (#754, #917). Most of the discussion has been around having tests for the bulk of the functionality in stubs and the libraries ...

X Description: We've had some useful, long discussions about writing tests for stubs (#754, #917). Most of the discussion has been around having tests for the bulk of the functionality in stubs and the librar...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Tests specifically for tricky, white-lie signatures","articleBody":"We've had some useful, long discussions about writing tests for stubs (#754, #917). Most of the discussion has been around having tests for the bulk of the functionality in stubs and the libraries they describe. I think we're all broadly in agreement that\r\n* such comprehensive tests would be valuable; but\r\n* just writing out a test for each function and class stubbed isn't helpful, because it amounts to repeating what we're already saying in the stubs; and\r\n* a higher-tech approach to testing the bulk of the stubs' content won't be trivial to get to work with a good signal-to-noise ratio. (It'll be great if it *can* be done; some folks are working on it, and others are skeptical it can.)\r\n\r\nThis issue is for a narrower proposal: sometimes when a library's real signature is something complex or hard to express in the type system, our signature ends up pretty tricky or we end up telling sort of a white lie to the type-checkers. For these, even when looking right at the signature in one window and the library's docs (or an experiment in the REPL) in the other, it can be hard to tell whether they match. In these cases, I think a hand-written test would be useful -- probably looking a lot like a mypy unit test, with some code to be type-checked and an indication that certain lines should have errors and the rest shouldn't, and then we could e.g. run mypy and pytype against it.\r\n\r\n@JukkaL suggested just this in one bullet point of [a comment on #754](https://github.com/python/typeshed/issues/754#issuecomment-275663086), and gave some examples:\r\n> Add a test that exercises particularly complex signatures. Some recent examples where this could have been helpful are dict.get (a recent change to it broke it on mypy) and requests.api (there was a bad signature).\r\n\r\nA new example today is #1331: `auto` doesn't really inherit from `IntFlag`, and we may find a new way of refining how we describe that interaction in the stubs. When we do it'll be useful to have a test for the functionality that that little lie in the stubs is intended to provide.\r\n","author":{"url":"https://github.com/gnprice","@type":"Person","name":"gnprice"},"datePublished":"2017-05-24T22:17:32Z","url":"https://github.com/python/typeshed/issues/1339"}

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:04e25f03-b7fe-466d-4caf-e3a59a6333e3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAA8E:10F75B:10BE185:1611E62:6B000B49
html-safe-noncedfac3c0b4644f75d6bd924228d7654196aecfdd7cebd0531203b41445b73c306
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQThFOjEwRjc1QjoxMEJFMTg1OjE2MTFFNjI6NkIwMDBCNDkiLCJ2aXNpdG9yX2lkIjoiNDY4NzU4MjU2MzQwMzgyODA0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaccbc48d29d9fefcb3c4f7aefb468794893caf939dd7674eb68a0438d98cdf06ff
hovercard-subject-tagissue:231187445
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/1339/issue_layout
twitter:imagehttps://opengraph.githubassets.com/656ecb0eb9c73617bd2d444a3d5868df8788d3eb489056cb18500483c687d62f/python/typeshed/issues/1339
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/656ecb0eb9c73617bd2d444a3d5868df8788d3eb489056cb18500483c687d62f/python/typeshed/issues/1339
og:image:altWe've had some useful, long discussions about writing tests for stubs (#754, #917). Most of the discussion has been around having tests for the bulk of the functionality in stubs and the libraries ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamegnprice
hostnamegithub.com
expected-hostnamegithub.com
None0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729
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
release16a11879678aaf97e2a42c33ee70830aa084fa37
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/typeshed/issues/1339#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fissues%2F1339
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%2F1339
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/1339
Reloadhttps://github.com/python/typeshed/issues/1339
Reloadhttps://github.com/python/typeshed/issues/1339
pythonhttps://github.com/python
typeshedhttps://github.com/python/typeshed
Codehttps://github.com/python/typeshed
Issues196 (196)https://github.com/python/typeshed/issues
Pull requests251 (251)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/1339
New issuehttps://github.com/login?return_to=https://github.com/python/typeshed/issues/1339
Tests specifically for tricky, white-lie signatureshttps://github.com/python/typeshed/issues/1339#top
project: infrastructuretypeshed build, test, or distribution relatedhttps://github.com/python/typeshed/issues?q=state%3Aopen%20label%3A%22project%3A%20infrastructure%22
https://github.com/gnprice
gnpricehttps://github.com/gnprice
on May 24, 2017https://github.com/python/typeshed/issues/1339#issue-231187445
#754https://github.com/python/typeshed/issues/754
#917https://github.com/python/typeshed/pull/917
@JukkaLhttps://github.com/JukkaL
a comment on #754https://github.com/python/typeshed/issues/754#issuecomment-275663086
#1331https://github.com/python/typeshed/pull/1331
https://github.com/gnprice
gnpricehttps://github.com/gnprice
on May 24, 2017https://github.com/python/typeshed/issues/1339#issuecomment-303868540
@JukkaLhttps://github.com/JukkaL
@gvanrossumhttps://github.com/gvanrossum
@vlasovskikhhttps://github.com/vlasovskikh
@matthiaskrammhttps://github.com/matthiaskramm
@JelleZijlstrahttps://github.com/JelleZijlstra
@ambvhttps://github.com/ambv
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on May 24, 2017https://github.com/python/typeshed/issues/1339#issuecomment-303869291
python/typing#436https://github.com/python/typing/pull/436
https://github.com/matthiaskramm
matthiaskrammhttps://github.com/matthiaskramm
on May 25, 2017https://github.com/python/typeshed/issues/1339#issuecomment-303910687
https://github.com/python/cpython/tree/master/Lib/testhttps://github.com/python/cpython/tree/master/Lib/test
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on May 25, 2017https://github.com/python/typeshed/issues/1339#issuecomment-303912444
https://github.com/vlasovskikh
vlasovskikhhttps://github.com/vlasovskikh
on May 30, 2017https://github.com/python/typeshed/issues/1339#issuecomment-305025293
srittauhttps://github.com/srittau
project: policyOrganization of the typeshed projecthttps://github.com/python/typeshed/issues?q=state%3Aopen%20label%3A%22project%3A%20policy%22
on Oct 21, 2018https://github.com/python/typeshed/issues/1339#event-1916687866
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Dec 3, 2020https://github.com/python/typeshed/issues/1339#issuecomment-737645325
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Feb 10, 2021https://github.com/python/typeshed/issues/1339#issuecomment-776813832
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Feb 10, 2021https://github.com/python/typeshed/issues/1339#issuecomment-776899649
https://github.com/srittau
srittauhttps://github.com/srittau
on Apr 9, 2021https://github.com/python/typeshed/issues/1339#issuecomment-816598699
@JukkaLhttps://github.com/JukkaL
@hauntsaninjahttps://github.com/hauntsaninja
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
on Nov 19, 2021https://github.com/python/typeshed/issues/1339#issuecomment-974165907
@hauntsaninjahttps://github.com/hauntsaninja
wrotehttps://github.com/python/typeshed/issues/1339#issuecomment-737645325
exceedingly difficult to typehttps://github.com/python/typeshed/pull/6325
@JelleZijlstrahttps://github.com/JelleZijlstra
notedhttps://github.com/hauntsaninja/mypy_primer/pull/22#issuecomment-971748211
something along these lineshttps://github.com/hauntsaninja/mypy_primer/pull/22
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on Nov 19, 2021https://github.com/python/typeshed/issues/1339#issuecomment-974169538
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
on Nov 19, 2021https://github.com/python/typeshed/issues/1339#issuecomment-974180217
#6307https://github.com/python/typeshed/issues/6307
https://github.com/Akuli
Akulihttps://github.com/Akuli
on Nov 19, 2021https://github.com/python/typeshed/issues/1339#issuecomment-974252853
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
on Nov 19, 2021https://github.com/python/typeshed/issues/1339#issuecomment-974281574
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on Nov 19, 2021https://github.com/python/typeshed/issues/1339#issuecomment-974287603
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
on Nov 19, 2021https://github.com/python/typeshed/issues/1339#issuecomment-974524050
https://github.com/sobolevn
sobolevnhttps://github.com/sobolevn
on Nov 20, 2021https://github.com/python/typeshed/issues/1339#issuecomment-974617585
https://github.com/typeddjango/pytest-mypy-pluginshttps://github.com/typeddjango/pytest-mypy-plugins
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
on Nov 21, 2021https://github.com/python/typeshed/issues/1339#issuecomment-974803013
https://github.com/typeddjango/pytest-mypy-pluginshttps://github.com/typeddjango/pytest-mypy-plugins
@sobolevnhttps://github.com/sobolevn
https://github.com/sobolevn
sobolevnhttps://github.com/sobolevn
on Nov 21, 2021https://github.com/python/typeshed/issues/1339#issuecomment-974816239
@sobolevnhttps://github.com/sobolevn
srittauhttps://github.com/srittau
project: infrastructuretypeshed build, test, or distribution relatedhttps://github.com/python/typeshed/issues?q=state%3Aopen%20label%3A%22project%3A%20infrastructure%22
project: policyOrganization of the typeshed projecthttps://github.com/python/typeshed/issues?q=state%3Aopen%20label%3A%22project%3A%20policy%22
on Jan 17, 2022https://github.com/python/typeshed/issues/1339#event-5904914511
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on Apr 26, 2022https://github.com/python/typeshed/issues/1339#issuecomment-1109237673
#7663https://github.com/python/typeshed/pull/7663
JelleZijlstrahttps://github.com/JelleZijlstra
completedhttps://github.com/python/typeshed/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 26, 2022https://github.com/python/typeshed/issues/1339#event-6494931414
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/typeshed/issues/1339
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/typeshed/issues/1339
project: infrastructuretypeshed build, test, or distribution relatedhttps://github.com/python/typeshed/issues?q=state%3Aopen%20label%3A%22project%3A%20infrastructure%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.