René's URL Explorer Experiment


Title: RFC: Rework `*args` parsing by randolf-scholz · Pull Request #20472 · python/mypy · GitHub

Open Graph Title: RFC: Rework `*args` parsing by randolf-scholz · Pull Request #20472 · python/mypy

X Title: RFC: Rework `*args` parsing by randolf-scholz · Pull Request #20472 · python/mypy

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

Open Graph Description: Apologies in advance for this monster PR. This is based on #19651, which had a flaw discovered in #19651 (comment), that turned out to be lethal for the approach taken. It turns out we need much mo...

X Description: Apologies in advance for this monster PR. This is based on #19651, which had a flaw discovered in #19651 (comment), that turned out to be lethal for the approach taken. It turns out we need much mo...

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

X: @github

direct link

Domain: github.com

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:2136ac5b-7bbc-1795-8ffa-841585f2fe70
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9EF0:83A89:F5524:14CB05:6A6289FE
html-safe-nonce3915bacbeb5531e37ef0a227cc5eeb7b2046c79a17f20990edbe9c283a4dfd3b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RUYwOjgzQTg5OkY1NTI0OjE0Q0IwNTo2QTYyODlGRSIsInZpc2l0b3JfaWQiOiI1NDUwNzMxODAzMzM3Mzg0OTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2b9daf6155be20469c9825b93ea71400f222028c8cfe92283ac3bb54f38f87ee
hovercard-subject-tagpull_request:3129845371
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/20472/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/e42117d1e583e90321dba445a6d89c3d90c8da152879a602a76f806d5e09480a/python/mypy/pull/20472
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e42117d1e583e90321dba445a6d89c3d90c8da152879a602a76f806d5e09480a/python/mypy/pull/20472
og:image:altApologies in advance for this monster PR. This is based on #19651, which had a flaw discovered in #19651 (comment), that turned out to be lethal for the approach taken. It turns out we need much mo...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerandolf-scholz
hostnamegithub.com
expected-hostnamegithub.com
None7a4ef49a11a2c05de16a801b29c54a151d2e3262d6fd17381ca13b5ae25dda8f
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
release97b18c8f1d2683a31995fd6e802daf9bf0d4d3f0
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/mypy/pull/20472#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20472
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20472
Sign up https://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/20472
Reloadhttps://github.com/python/mypy/pull/20472
Reloadhttps://github.com/python/mypy/pull/20472
Please reload this pagehttps://github.com/python/mypy/pull/20472
python https://github.com/python
mypyhttps://github.com/python/mypy
Please reload this pagehttps://github.com/python/mypy/pull/20472
Notifications https://github.com/login?return_to=%2Fpython%2Fmypy
Fork 3.3k https://github.com/login?return_to=%2Fpython%2Fmypy
Star 20.6k https://github.com/login?return_to=%2Fpython%2Fmypy
Code https://github.com/python/mypy
Issues 2.7k https://github.com/python/mypy/issues
Pull requests 474 https://github.com/python/mypy/pulls
Actions https://github.com/python/mypy/actions
Projects https://github.com/python/mypy/projects
Wiki https://github.com/python/mypy/wiki
Security and quality 0 https://github.com/python/mypy/security
Insights https://github.com/python/mypy/pulse
Code https://github.com/python/mypy
Issues https://github.com/python/mypy/issues
Pull requests https://github.com/python/mypy/pulls
Actions https://github.com/python/mypy/actions
Projects https://github.com/python/mypy/projects
Wiki https://github.com/python/mypy/wiki
Security and quality https://github.com/python/mypy/security
Insights https://github.com/python/mypy/pulse
randolf-scholzhttps://github.com/randolf-scholz
python:masterhttps://github.com/python/mypy/tree/master
randolf-scholz:rework_star_argshttps://github.com/randolf-scholz/mypy/tree/rework_star_args
Conversationhttps://github.com/python/mypy/pull/20472
Commits4 (4)https://github.com/python/mypy/pull/20472/commits
Checkshttps://github.com/python/mypy/pull/20472/checks
Files changedhttps://github.com/python/mypy/pull/20472/files
RFC: Rework *args parsinghttps://github.com/python/mypy/pull/20472#top
randolf-scholzhttps://github.com/randolf-scholz
python:masterhttps://github.com/python/mypy/tree/master
randolf-scholz:rework_star_argshttps://github.com/randolf-scholz/mypy/tree/rework_star_args
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
Dec 25, 2025https://github.com/python/mypy/pull/20472#issue-3761820011
Please reload this pagehttps://github.com/python/mypy/pull/20472
#19651https://github.com/python/mypy/pull/19651
#19651 (comment)https://github.com/python/mypy/pull/19651#issuecomment-3193885899
type inference failure on custom iterable class unpacking #20435https://github.com/python/mypy/issues/20435
Inconsistent constraint resolution for tuples. #19860https://github.com/python/mypy/issues/19860
Bad interaction between ParamSpec and TypeVarTuple #19855https://github.com/python/mypy/issues/19855
Incorrect mapping of actual to formal arguments. #19692https://github.com/python/mypy/issues/19692
mypy doesn't understand that *args: P.args implies that args is a tuple #19663https://github.com/python/mypy/issues/19663
mypy fails to correctly understand some iterable type in *args #19662https://github.com/python/mypy/issues/19662
Mypy fails to solve tuple[int, *Ts, int] as an Iterable[T]. #19659https://github.com/python/mypy/issues/19659
[1.14 regression] Unpacking an iterator converts the inner type to Any #18320https://github.com/python/mypy/issues/18320
Variadic *args where args: Union[Tuple[...], Tuple[...], ...] are _never_ checked [False Negative] #17161https://github.com/python/mypy/issues/17161
Unpacking unions of tuples skips type checking #15969https://github.com/python/mypy/issues/15969
Unpacking an iterable in a list comprehension leads to the type inferred as list[Any] #15747https://github.com/python/mypy/issues/15747
Custom __iter__ method yields false positive when used with star args (*) #14470https://github.com/python/mypy/issues/14470
False-positive with multiple *args splats in a function call #10481https://github.com/python/mypy/issues/10481
"multiple values for keyword argument" with star expansion #6799https://github.com/python/mypy/issues/6799
Can't infer tuple inside match case #18039https://github.com/python/mypy/issues/18039
open problemshttps://github.com/python/mypy/pull/20472#open-problems
Overridden __iter__ with more specific item type is only respected in some contexts #16492https://github.com/python/mypy/issues/16492
https://mypy-play.net/?mypy=latest&python=3.12&gist=82739825de042dfeea487d83823d11bdhttps://mypy-play.net/?mypy=latest&python=3.12&gist=82739825de042dfeea487d83823d11bd
pyright playgroundhttps://pyright-play.net/?strict=true&code=GYJw9gtgBALgngBwJYDsDmUkQWEMoCqKCAhgMYDWAUFWQDYkDOjUACgFxQB0PtDzUAGqceXPkxYBlEbyoATAKbAowABRUomqCQCMnVgBptAJn1GA9Ea3Wbtu-c0BiKAhBKkADw1aAVCRBojJxEpJQA2jAArgh0CmEh5BQR0bFhgkaiALqZRpK52VbOkSgARmDFinJQANRQjJHAwJ5UAJRQALQAfFAAcmAoCpykzDSKyjAKjDAA%2BmhgYHLTZEyTOurWCGbemgBunFExcencPDnbdZx5rR3dfQPs585kABYKlNp0dC5gzEglsVASiBEgoYKgMGRICVUCQwf1GI9YK83NoUQAWACs31%2B-wUUAA7iQ4CwYGAXP4FCgYK9GEgAF546l4-xoSIQSkwBHWZyqOhIGAwAGSF7gBSKEBQFBskoKEBGRgKPHPAUIILmcxgBRIRhcXBocwAQQADEadCaAMwtc5qBBGW1QHw7eXyq3WG12oyOz2qRgu11ad0ub1euotF3W1T2%2B0%2BVQh32h-2aQPR2NOh0%2Bv2JlSRj3pmNxsMJiMp6M7QvxxhZwMx0uFmMVlpVnPp0su8Nu5s14NpyvlpsprsOstt0PF72tup%2Bsctz1p%2BuZ6eD-M9vv98fd50JtczvNzjNb7dL2Opke9w-H2ub3uLi%2Bzuv7s83pcrqcdgedk8J18Bj-5zvD0NvyTW8XDrHt2x-QcEDA70GybKD7wLCDgIQjdJyLDtUN3WCF0w5toODT9KyA7MoLvK94I-Wty2Q0iQIIocaNHPCo3I9M4IjI9qJwjDIPosD7w4ljcyQ5i%2BNY7CvzElCqLY4jpLoktZz9Wi1C4tCz1UkC-0vKTK04-jlMAhS1MMyTey0nSRIA%2BT9Lw9TGL7Szjywx0nNHIA
https://mypy-play.net/?mypy=latest&python=3.12&gist=2be305f25ddbea0fc37f02b319a2d90dhttps://mypy-play.net/?mypy=latest&python=3.12&gist=2be305f25ddbea0fc37f02b319a2d90d
mypy-playhttps://mypy-play.net/?mypy=latest&python=3.12&enable-incomplete-feature=PreciseTupleTypes&gist=548f06df05b51868e125f8cfd4a15919
Incorrect mapping of actual to formal arguments. #19692 (comment)https://github.com/python/mypy/issues/19692#issuecomment-3238851841
AnyOf - Union for return types typing#566https://github.com/python/typing/issues/566
Inconsistent constraint resolution for tuples. #19860 (comment)https://github.com/python/mypy/issues/19860#issuecomment-3297377452
Overridden __iter__ with more specific item type is only respected in some contexts #16492https://github.com/python/mypy/issues/16492
tuple index out of range error is inconsistent #20475https://github.com/python/mypy/issues/20475
tuple[Any, *tuple[Any, ...]] is not assignable to other tuple types #19109https://github.com/python/mypy/issues/19109
Lenient TypeVarTuple checking when number of dimensions is unknown #18665https://github.com/python/mypy/issues/18665
Inconsistent constraint resolution for tuples. #19860https://github.com/python/mypy/issues/19860
Inconsistent constraint resolution for tuples. #19860https://github.com/python/mypy/issues/19860
mypy doesn't understand that *args: P.args implies that args is a tuple #19663https://github.com/python/mypy/issues/19663
Incorrect mapping of actual to formal arguments. #19692https://github.com/python/mypy/issues/19692
Bad interaction between ParamSpec and TypeVarTuple #19855https://github.com/python/mypy/issues/19855
Incorrect mapping of actual to formal arguments. #19692https://github.com/python/mypy/issues/19692
Inconsistent constraint resolution for tuples. #19860https://github.com/python/mypy/issues/19860
Incorrect mapping of actual to formal arguments. #19692https://github.com/python/mypy/issues/19692
Incorrect mapping of actual to formal arguments. #19692https://github.com/python/mypy/issues/19692
mypy fails to correctly understand some iterable type in *args #19662https://github.com/python/mypy/issues/19662
Incorrect mapping of actual to formal arguments. #19692https://github.com/python/mypy/issues/19692
Inconsistent constraint resolution for tuples. #19860https://github.com/python/mypy/issues/19860
Please reload this pagehttps://github.com/python/mypy/pull/20472
randolf-scholzhttps://github.com/randolf-scholz
December 25, 2025 11:12https://github.com/python/mypy/pull/20472#commits-pushed-7db048d
https://github.com/randolf-scholz
more cleanup and documentationhttps://github.com/python/mypy/pull/20472/commits/7db048d9e8087f7cce77eadc3cbd3785baaf0427
7db048dhttps://github.com/python/mypy/pull/20472/commits/7db048d9e8087f7cce77eadc3cbd3785baaf0427
https://github.com/randolf-scholz
fixed but with tuple from Anyhttps://github.com/python/mypy/pull/20472/commits/06f12c00bcfa10fd2fc4f78f52d8fdd4403dafeb
06f12c0https://github.com/python/mypy/pull/20472/commits/06f12c00bcfa10fd2fc4f78f52d8fdd4403dafeb
https://github.com/randolf-scholz
black formatterhttps://github.com/python/mypy/pull/20472/commits/16061cf57a2d63d53a8cb9e3ae2f6c8a895a0eab
16061cfhttps://github.com/python/mypy/pull/20472/commits/16061cf57a2d63d53a8cb9e3ae2f6c8a895a0eab
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
Dec 25, 2025https://github.com/python/mypy/pull/20472#event-21750228385
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Dec 25, 2025 https://github.com/python/mypy/pull/20472#ref-issue-3761820632
Check #20472 sterliakov/mypy-issues#233 https://github.com/sterliakov/mypy-issues/issues/233
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20472
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
Dec 26, 2025 https://github.com/python/mypy/pull/20472#ref-issue-3762968034
tuple index out of range error is inconsistent #20475 https://github.com/python/mypy/issues/20475
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
Dec 26, 2025https://github.com/python/mypy/pull/20472#issuecomment-3692451479
Please reload this pagehttps://github.com/python/mypy/pull/20472
tuple index out of range error is inconsistent #20475https://github.com/python/mypy/issues/20475
tuple[Any, *tuple[Any, ...]] is not assignable to other tuple types #19109https://github.com/python/mypy/issues/19109
Lenient TypeVarTuple checking when number of dimensions is unknown #18665https://github.com/python/mypy/issues/18665
Please reload this pagehttps://github.com/python/mypy/pull/20472
https://github.com/randolf-scholz
added fast path for tuple[Any, ...] comparisonhttps://github.com/python/mypy/pull/20472/commits/024cf4963b837cd9f78ed0ad3f46061e953a89b8
024cf49https://github.com/python/mypy/pull/20472/commits/024cf4963b837cd9f78ed0ad3f46061e953a89b8
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Dec 28, 2025https://github.com/python/mypy/pull/20472#issuecomment-3695070131
mypy_primerhttps://github.com/hauntsaninja/mypy_primer
Please reload this pagehttps://github.com/python/mypy/pull/20472
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
Jan 2, 2026 https://github.com/python/mypy/pull/20472#ref-pullrequest-3318286131
Rework starargs with union argument #19651 https://github.com/python/mypy/pull/19651
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
Jan 16, 2026 https://github.com/python/mypy/pull/20472#ref-issue-3809565816
Misleading error message with dict.get like method. (polymorphic function with conflicting context) #20576 https://github.com/python/mypy/issues/20576
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
Mar 8, 2026 https://github.com/python/mypy/pull/20472#ref-pullrequest-3149539966
Remove list.__add__ overloads. python/typeshed#14282 https://github.com/python/typeshed/pull/14282
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
Apr 7, 2026 https://github.com/python/mypy/pull/20472#ref-pullrequest-4196809054
Fix regression involving dict or on recursive dict #21148 https://github.com/python/mypy/pull/21148
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%2F20472
Unpacking unions of tuples skips type checking https://github.com/python/mypy/issues/15969
Unpacking an iterable in a list comprehension leads to the type inferred as list[Any] https://github.com/python/mypy/issues/15747
Custom __iter__ method yields false positive when used with star args (*) https://github.com/python/mypy/issues/14470
False-positive with multiple *args splats in a function call https://github.com/python/mypy/issues/10481
"multiple values for keyword argument" with star expansion https://github.com/python/mypy/issues/6799
Overridden __iter__ with more specific item type is only respected in some contexts https://github.com/python/mypy/issues/16492
Variadic *args where args: Union[Tuple[...], Tuple[...], ...] are _never_ checked [False Negative] https://github.com/python/mypy/issues/17161
Can't infer tuple inside match case https://github.com/python/mypy/issues/18039
[1.14 regression] Unpacking an iterator converts the inner type to Any https://github.com/python/mypy/issues/18320
Mypy fails to solve tuple[int, *Ts, int] as an Iterable[T]. https://github.com/python/mypy/issues/19659
Please reload this pagehttps://github.com/python/mypy/pull/20472
https://github.com/randolf-scholz
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.