René's URL Explorer Experiment


Title: Implement type-aware `get` for TypedDict by rowillia · Pull Request #2620 · python/mypy · GitHub

Open Graph Title: Implement type-aware `get` for TypedDict by rowillia · Pull Request #2620 · python/mypy

X Title: Implement type-aware `get` for TypedDict by rowillia · Pull Request #2620 · python/mypy

Description: Optional static typing for Python. Contribute to python/mypy development by creating an account on GitHub.

Open Graph Description: Previously, get would simply fallback to the type of the underlying dictionary which made TypedDicts hard to use with code that's parsing objects where fields may or may not be present (for exa...

X Description: Previously, get would simply fallback to the type of the underlying dictionary which made TypedDicts hard to use with code that's parsing objects where fields may or may not be present (for...

Opengraph URL: https://github.com/python/mypy/pull/2620

X: @github

direct link

Domain: github.com

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/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:333f6fd6-7690-cee9-2254-d659783cd0b4
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8E14:2573D7:291D31F:3835361:6B004CCD
html-safe-nonce9679bbcb90580d2c07cefee7282b7e3c9daa2e397bef55636b55e36d3bddc9f8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTE0OjI1NzNENzoyOTFEMzFGOjM4MzUzNjE6NkIwMDRDQ0QiLCJ2aXNpdG9yX2lkIjoiMzE1MjM4MjgzMDI4MjAzNDM4MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac68f5c6c62474523ce44da5cd9f93c14d350ba1a8d2a944823cb68eb275ad5917
hovercard-subject-tagpull_request:99590478
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/mypy/2620/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/ee24f62f73eb79df174d70b57974e1cbd1d17d2d022f92e5124ec2e3cdf24069/python/mypy/pull/2620
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ee24f62f73eb79df174d70b57974e1cbd1d17d2d022f92e5124ec2e3cdf24069/python/mypy/pull/2620
og:image:altPreviously, get would simply fallback to the type of the underlying dictionary which made TypedDicts hard to use with code that's parsing objects where fields may or may not be present (for exa...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerowillia
hostnamegithub.com
expected-hostnamegithub.com
Nonef9517bf360d46638a1e5e7daee7158842fe5ef43c9000afa0e127564a7c2f39b
turbo-cache-controlno-cache
go-importgithub.com/python/mypy git https://github.com/python/mypy.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id7053637
octolytics-dimension-repository_nwopython/mypy
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7053637
octolytics-dimension-repository_network_root_nwopython/mypy
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
releaseb27c5dde30676028abd5c5fc53ce5c9b625f8281
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/mypy/pull/2620#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F2620
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%2Fmypy%2Fpull%2F2620
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%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fmypy
Reloadhttps://github.com/python/mypy/pull/2620
Reloadhttps://github.com/python/mypy/pull/2620
Reloadhttps://github.com/python/mypy/pull/2620
pythonhttps://github.com/python
mypyhttps://github.com/python/mypy
Codehttps://github.com/python/mypy
Issues2.7k (2.7k)https://github.com/python/mypy/issues
Pull requests546 (546)https://github.com/python/mypy/pulls
Actionshttps://github.com/python/mypy/actions
Projectshttps://github.com/python/mypy/projects
Wikihttps://github.com/python/mypy/wiki
Security and qualityhttps://github.com/python/mypy/security
Insightshttps://github.com/python/mypy/insights
https://github.com/python/mypy
rowilliahttps://github.com/rowillia
python:masterhttps://github.com/python/mypy/tree/master
rowillia:implement_get_method_on_typed_dictshttps://github.com/rowillia/mypy/tree/implement_get_method_on_typed_dicts
Conversationhttps://github.com/python/mypy/pull/2620
Commits6 (6)https://github.com/python/mypy/pull/2620/commits
Checkshttps://github.com/python/mypy/pull/2620/checks
Files changedhttps://github.com/python/mypy/pull/2620/files
Implement type-aware get for TypedDicthttps://github.com/python/mypy/pull/2620#top
rowilliahttps://github.com/rowillia
python:masterhttps://github.com/python/mypy/tree/master
rowillia:implement_get_method_on_typed_dictshttps://github.com/rowillia/mypy/tree/implement_get_method_on_typed_dicts
https://github.com/rowillia
rowilliahttps://github.com/rowillia
Dec 28, 2016https://github.com/python/mypy/pull/2620#issue-197913117
Please reload this pagehttps://github.com/python/mypy/pull/2620
#2612https://github.com/python/mypy/issues/2612
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/rowillia
rowilliahttps://github.com/rowillia
force-pushedhttps://github.com/python/mypy/compare/0de22fc115f78de558bac7f50378ccce16ce5593..586c1fdcb29ee460fbb2154406ec3c838e242731
0de22fchttps://github.com/python/mypy/commit/0de22fc115f78de558bac7f50378ccce16ce5593
586c1fdhttps://github.com/python/mypy/commit/586c1fdcb29ee460fbb2154406ec3c838e242731
Compare https://github.com/python/mypy/compare/0de22fc115f78de558bac7f50378ccce16ce5593..586c1fdcb29ee460fbb2154406ec3c838e242731
December 28, 2016 20:56https://github.com/python/mypy/pull/2620#event-906860732
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
Jan 3, 2017https://github.com/python/mypy/pull/2620#issuecomment-270224401
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
Jan 3, 2017https://github.com/python/mypy/pull/2620#issuecomment-270233050
Please reload this pagehttps://github.com/python/mypy/pull/2620
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
Jan 4, 2017https://github.com/python/mypy/pull/2620#issuecomment-270361158
#2632https://github.com/python/mypy/issues/2632
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
Jan 4, 2017https://github.com/python/mypy/pull/2620#issuecomment-270409734
@JukkaLhttps://github.com/JukkaL
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
Jan 4, 2017https://github.com/python/mypy/pull/2620#issuecomment-270420723
#2632https://github.com/python/mypy/issues/2632
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/rowillia
rowilliahttps://github.com/rowillia
Jan 4, 2017https://github.com/python/mypy/pull/2620#issuecomment-270439676
@JukkaLhttps://github.com/JukkaL
https://marshmallow.readthedocs.io/en/latest/https://marshmallow.readthedocs.io/en/latest/
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/rowillia
rowilliahttps://github.com/rowillia
force-pushedhttps://github.com/python/mypy/compare/f8c9dffb4becdd2abe6ef6ac2e80c226979f3579..24d2ae67957f209aa94e17dbb28a448f3b98ca3a
f8c9dffhttps://github.com/python/mypy/commit/f8c9dffb4becdd2abe6ef6ac2e80c226979f3579
24d2ae6https://github.com/python/mypy/commit/24d2ae67957f209aa94e17dbb28a448f3b98ca3a
Compare https://github.com/python/mypy/compare/f8c9dffb4becdd2abe6ef6ac2e80c226979f3579..24d2ae67957f209aa94e17dbb28a448f3b98ca3a
January 7, 2017 00:06https://github.com/python/mypy/pull/2620#event-914761422
https://github.com/rowillia
rowilliahttps://github.com/rowillia
Jan 7, 2017https://github.com/python/mypy/pull/2620#issuecomment-271047986
Please reload this pagehttps://github.com/python/mypy/pull/2620
@JukkaLhttps://github.com/JukkaL
@gvanrossumhttps://github.com/gvanrossum
Please reload this pagehttps://github.com/python/mypy/pull/2620
January 11, 2017 13:13https://github.com/python/mypy/pull/2620#commits-pushed-4028dfc
Implement type-aware get for TypedDicthttps://github.com/python/mypy/pull/2620/commits/4028dfc5a0b803cf052c1076eed556bf86994e21
4028dfchttps://github.com/python/mypy/pull/2620/commits/4028dfc5a0b803cf052c1076eed556bf86994e21
python#2612https://github.com/python/mypy/issues/2612
Add test to ensure get method is still treated as a callablehttps://github.com/python/mypy/pull/2620/commits/9186c522bb208ae23d727baa568bcd715ed7f4b0
9186c52https://github.com/python/mypy/pull/2620/commits/9186c522bb208ae23d727baa568bcd715ed7f4b0
Create an Optional for calls to get with only one parameterhttps://github.com/python/mypy/pull/2620/commits/79a5114add21dbe402cd86b53b51b55f5d74aa2c
79a5114https://github.com/python/mypy/pull/2620/commits/79a5114add21dbe402cd86b53b51b55f5d74aa2c
Still typecheck default parameter, add test case with invalid default…https://github.com/python/mypy/pull/2620/commits/9e94cff182e8e71f78696fb211707512a3b72e2d
9e94cffhttps://github.com/python/mypy/pull/2620/commits/9e94cff182e8e71f78696fb211707512a3b72e2d
Add testcase for get with list default parameterhttps://github.com/python/mypy/pull/2620/commits/c5f74811f122210fbd68ac6763ea9f62e36730ff
c5f7481https://github.com/python/mypy/pull/2620/commits/c5f74811f122210fbd68ac6763ea9f62e36730ff
https://github.com/rowillia
rowilliahttps://github.com/rowillia
force-pushedhttps://github.com/python/mypy/compare/24d2ae67957f209aa94e17dbb28a448f3b98ca3a..c5f74811f122210fbd68ac6763ea9f62e36730ff
24d2ae6https://github.com/python/mypy/commit/24d2ae67957f209aa94e17dbb28a448f3b98ca3a
c5f7481https://github.com/python/mypy/commit/c5f74811f122210fbd68ac6763ea9f62e36730ff
Compare https://github.com/python/mypy/compare/24d2ae67957f209aa94e17dbb28a448f3b98ca3a..c5f74811f122210fbd68ac6763ea9f62e36730ff
January 11, 2017 21:13https://github.com/python/mypy/pull/2620#event-919792413
Simplify logic with overriding callee in cases of TypedDict.get funct…https://github.com/python/mypy/pull/2620/commits/b1022bf58ca30e1233677312634b34ab0fa29449
b1022bfhttps://github.com/python/mypy/pull/2620/commits/b1022bf58ca30e1233677312634b34ab0fa29449
https://github.com/rowillia
rowilliahttps://github.com/rowillia
force-pushedhttps://github.com/python/mypy/compare/8c5975ec7412b2716b6c19e291aa4ac64d28b4c9..b1022bf58ca30e1233677312634b34ab0fa29449
8c5975ehttps://github.com/python/mypy/commit/8c5975ec7412b2716b6c19e291aa4ac64d28b4c9
b1022bfhttps://github.com/python/mypy/commit/b1022bf58ca30e1233677312634b34ab0fa29449
Compare https://github.com/python/mypy/compare/8c5975ec7412b2716b6c19e291aa4ac64d28b4c9..b1022bf58ca30e1233677312634b34ab0fa29449
January 12, 2017 17:32https://github.com/python/mypy/pull/2620#event-921087120
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
Jan 16, 2017 https://github.com/python/mypy/pull/2620#pullrequestreview-16821130
View reviewed changes https://github.com/python/mypy/pull/2620/files/b1022bf58ca30e1233677312634b34ab0fa29449
JukkaLhttps://github.com/JukkaL
https://github.com/python/mypy/pull/2620#pullrequestreview-16821130
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/2620
test-data/unit/check-typeddict.testhttps://github.com/python/mypy/pull/2620/files/b1022bf58ca30e1233677312634b34ab0fa29449#diff-1db589b0c06e93bf0f492fb32a043ad16c054379c19cd39da57960e98c4b8be0
JukkaLhttps://github.com/JukkaL
Jan 16, 2017https://github.com/python/mypy/pull/2620#discussion_r96244520
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/2620
test-data/unit/check-typeddict.testhttps://github.com/python/mypy/pull/2620/files/b1022bf58ca30e1233677312634b34ab0fa29449#diff-1db589b0c06e93bf0f492fb32a043ad16c054379c19cd39da57960e98c4b8be0
JukkaLhttps://github.com/JukkaL
Jan 16, 2017https://github.com/python/mypy/pull/2620#discussion_r96245996
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/2620
test-data/unit/check-typeddict.testhttps://github.com/python/mypy/pull/2620/files/b1022bf58ca30e1233677312634b34ab0fa29449#diff-1db589b0c06e93bf0f492fb32a043ad16c054379c19cd39da57960e98c4b8be0
JukkaLhttps://github.com/JukkaL
Jan 16, 2017https://github.com/python/mypy/pull/2620#discussion_r96246274
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/2620
mypy/checkexpr.pyhttps://github.com/python/mypy/pull/2620/files/b1022bf58ca30e1233677312634b34ab0fa29449#diff-42eda644ce5003e33ea0766d7601fcfb4934ad106429abfe115954a1fccddd07
JukkaLhttps://github.com/JukkaL
Jan 16, 2017https://github.com/python/mypy/pull/2620#discussion_r96246698
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
Mar 24, 2017https://github.com/python/mypy/pull/2620#issuecomment-288995415
@rowilliahttps://github.com/rowillia
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
Apr 12, 2017https://github.com/python/mypy/pull/2620#issuecomment-293644977
@rowilliahttps://github.com/rowillia
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
Apr 30, 2017https://github.com/python/mypy/pull/2620#issuecomment-298246665
@JukkaLhttps://github.com/JukkaL
@rowilliahttps://github.com/rowillia
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
May 31, 2017https://github.com/python/mypy/pull/2620#issuecomment-305299111
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
May 31, 2017https://github.com/python/mypy/pull/2620#issuecomment-305299760
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
JukkaLhttps://github.com/JukkaL
May 31, 2017https://github.com/python/mypy/pull/2620#event-1105149785
JukkaLhttps://github.com/JukkaL
Jun 6, 2017 https://github.com/python/mypy/pull/2620#ref-commit-2cf5cd7
https://github.com/JukkaL
TypedDict get tweakshttps://github.com/python/mypy/commit/2cf5cd72057c20a06d521d1354f625ac808d9d76
2cf5cd7https://github.com/python/mypy/commit/2cf5cd72057c20a06d521d1354f625ac808d9d76
#2620https://github.com/python/mypy/pull/2620
@rowilliahttps://github.com/rowillia
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
Jun 6, 2017 https://github.com/python/mypy/pull/2620#ref-pullrequest-233920999
Refactor plugin system and special case TypedDict get and int.__pow__ #3501 https://github.com/python/mypy/pull/3501
JukkaLhttps://github.com/JukkaL
Jun 7, 2017 https://github.com/python/mypy/pull/2620#ref-commit-bcf89b1
https://github.com/JukkaL
Refactor plugin system and special case TypedDict get and int.__pow__ (https://github.com/python/mypy/commit/bcf89b133b992a467ddf7074313501fd1926f6b6
…https://github.com/python/mypy/pull/3501
bcf89b1https://github.com/python/mypy/commit/bcf89b133b992a467ddf7074313501fd1926f6b6
…#3501https://github.com/python/mypy/pull/3501
#2620https://github.com/python/mypy/pull/2620
@rowilliahttps://github.com/rowillia
#2632https://github.com/python/mypy/issues/2632
#2612https://github.com/python/mypy/issues/2612
#1240https://github.com/python/mypy/issues/1240
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
Jun 7, 2017https://github.com/python/mypy/pull/2620#issuecomment-306932949
#3501https://github.com/python/mypy/pull/3501
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
Jun 7, 2017https://github.com/python/mypy/pull/2620#event-1114490520
https://github.co/hiddenchars
https://github.com/python/mypy/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F2620
https://github.com/JukkaL
JukkaL https://github.com/JukkaL
https://github.com/python/mypy/pull/2620/files/b1022bf58ca30e1233677312634b34ab0fa29449
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/JukkaL
JukkaL https://github.com/JukkaL
TypedDict.get returns an object if a dictionary has more than one field and the types on those fields differ. https://github.com/python/mypy/issues/2612
Please reload this pagehttps://github.com/python/mypy/pull/2620
https://github.com/rowillia
https://github.com/JukkaL
https://github.com/gvanrossum
https://github.com/ilevkivskyi
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.