René's URL Explorer Experiment


Title: Do not consider bare TypeVar not overlapping with None for reachability analysis by sterliakov · Pull Request #18138 · python/mypy · GitHub

Open Graph Title: Do not consider bare TypeVar not overlapping with None for reachability analysis by sterliakov · Pull Request #18138 · python/mypy

X Title: Do not consider bare TypeVar not overlapping with None for reachability analysis by sterliakov · Pull Request #18138 · python/mypy

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

Open Graph Description: Fixes #18126. Simply allowing such intersection was insufficient: existing binder logic widened the type to T | None after the is None check. This PR extends the binder logic to prevent constructin...

X Description: Fixes #18126. Simply allowing such intersection was insufficient: existing binder logic widened the type to T | None after the is None check. This PR extends the binder logic to prevent constructin...

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

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:74a4de64-234c-eb7a-5532-efacf0378309
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB108:1F7A:152A3BE:1D153D1:6B002DA6
html-safe-noncee6c1e616e91b15438b02ceeaff7b7f26aabdfe66b4db3c645d3a04afbf50c8de
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTA4OjFGN0E6MTUyQTNCRToxRDE1M0QxOjZCMDAyREE2IiwidmlzaXRvcl9pZCI6IjkxNjU0MTY5ODY5MDgzMDY4NTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac9b064cefcb1d2e3dc0318bf9f03c1f8ca52a2ac31232cd61e58efaad8b5d14ff
hovercard-subject-tagpull_request:2171550528
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/18138/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/65a2a6f848b4317e6e803ccd8cc6afc79fdadc2d432922ce5e1be7dd69c69b55/python/mypy/pull/18138
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/65a2a6f848b4317e6e803ccd8cc6afc79fdadc2d432922ce5e1be7dd69c69b55/python/mypy/pull/18138
og:image:altFixes #18126. Simply allowing such intersection was insufficient: existing binder logic widened the type to T | None after the is None check. This PR extends the binder logic to prevent constructin...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesterliakov
hostnamegithub.com
expected-hostnamegithub.com
None7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0
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
releasef3f3a43ca095cdea3abbb394112e971f9fdb94fa
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/mypy/pull/18138#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F18138
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%2F18138
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/18138
Reloadhttps://github.com/python/mypy/pull/18138
Reloadhttps://github.com/python/mypy/pull/18138
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 requests547 (547)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
JukkaLhttps://github.com/JukkaL
python:masterhttps://github.com/python/mypy/tree/master
sterliakov:bugfix/st-none-typevar-overlaphttps://github.com/sterliakov/mypy/tree/bugfix/st-none-typevar-overlap
Conversationhttps://github.com/python/mypy/pull/18138
Commits6 (6)https://github.com/python/mypy/pull/18138/commits
Checkshttps://github.com/python/mypy/pull/18138/checks
Files changedhttps://github.com/python/mypy/pull/18138/files
Do not consider bare TypeVar not overlapping with None for reachability analysishttps://github.com/python/mypy/pull/18138#top
JukkaLhttps://github.com/JukkaL
python:masterhttps://github.com/python/mypy/tree/master
sterliakov:bugfix/st-none-typevar-overlaphttps://github.com/sterliakov/mypy/tree/bugfix/st-none-typevar-overlap
https://github.com/sterliakov
sterliakovhttps://github.com/sterliakov
Nov 10, 2024https://github.com/python/mypy/pull/18138#issue-2647481230
#18126https://github.com/python/mypy/issues/18126
Please reload this pagehttps://github.com/python/mypy/pull/18138
https://github.com/sterliakov
Allow TypeVar & None intersection when checking reachability.https://github.com/python/mypy/pull/18138/commits/42620b0bd484d0c44be9dd7d8e534886e9e44cac
42620b0https://github.com/python/mypy/pull/18138/commits/42620b0bd484d0c44be9dd7d8e534886e9e44cac
https://github.com/sterliakov
sterliakovhttps://github.com/sterliakov
November 10, 2024 18:04https://github.com/python/mypy/pull/18138#event-15241687623
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F18138
sterliakovhttps://github.com/sterliakov
November 10, 2024 19:18https://github.com/python/mypy/pull/18138#commits-pushed-7160e4e
https://github.com/sterliakov
Remove cast that caused a problemhttps://github.com/python/mypy/pull/18138/commits/7160e4e540f2da7bb94250de2718081b65db6606
7160e4ehttps://github.com/python/mypy/pull/18138/commits/7160e4e540f2da7bb94250de2718081b65db6606
https://github.com/sterliakov
Move cases with 3.10+ syntax to python310 filehttps://github.com/python/mypy/pull/18138/commits/207c75affc0b8d04380c4b5668de1f6ecb42420f
207c75ahttps://github.com/python/mypy/pull/18138/commits/207c75affc0b8d04380c4b5668de1f6ecb42420f
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F18138
https://github.com/sterliakov
sterliakovhttps://github.com/sterliakov
Nov 10, 2024https://github.com/python/mypy/pull/18138#issuecomment-2466912470
Please reload this pagehttps://github.com/python/mypy/pull/18138
playgroundhttps://mypy-play.net/?mypy=1.13.0&python=3.12&flags=strict&gist=f2df47d37c231b7d35e26744191d9e11
Nodehttps://github.com/docutils/docutils/blob/ceb8eb76a21da5553017bedb9eca8bb18ebde57f/docutils/docutils/nodes.py#L81
stubshttps://github.com/tk0miya/docutils-stubs/blob/b14071d065f8ee35399856fcaff6cd608294a342/docutils-stubs/nodes.pyi#L17
playgroundhttps://mypy-play.net/?mypy=master&python=3.12&flags=strict&gist=10d9f159ae3dcb3943f39e8720c13ddd
Please reload this pagehttps://github.com/python/mypy/pull/18138
https://github.com/sterliakov
sterliakovhttps://github.com/sterliakov
November 10, 2024 20:49https://github.com/python/mypy/pull/18138#event-15242012529
https://github.com/sterliakov
Merge branch 'master' into bugfix/st-none-typevar-overlaphttps://github.com/python/mypy/pull/18138/commits/374d4ddd0ef1ded0ff2ebc0c033016b59d109a91
374d4ddhttps://github.com/python/mypy/pull/18138/commits/374d4ddd0ef1ded0ff2ebc0c033016b59d109a91
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F18138
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
Nov 15, 2024 https://github.com/python/mypy/pull/18138#pullrequestreview-2438867061
View reviewed changes https://github.com/python/mypy/pull/18138/files/374d4ddd0ef1ded0ff2ebc0c033016b59d109a91
JukkaLhttps://github.com/JukkaL
https://github.com/python/mypy/pull/18138#pullrequestreview-2438867061
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/18138
mypy/binder.pyhttps://github.com/python/mypy/pull/18138/files/374d4ddd0ef1ded0ff2ebc0c033016b59d109a91#diff-cec7c57fef20b803fc1c4e988ad3971b3597f1fd1b12db07b47f825046f264f5
Please reload this pagehttps://github.com/python/mypy/pull/18138
mypy/checker.pyhttps://github.com/python/mypy/pull/18138/files/374d4ddd0ef1ded0ff2ebc0c033016b59d109a91#diff-f96a2d6138bc6cdf2a07c4d37f6071cc25c1631afc107e277a28d5b59fc0ef04
Please reload this pagehttps://github.com/python/mypy/pull/18138
sterliakovhttps://github.com/sterliakov
November 15, 2024 18:45https://github.com/python/mypy/pull/18138#commits-pushed-c2af54f
https://github.com/sterliakov
Merge remote-tracking branch 'upstream/master' into bugfix/st-none-ty…https://github.com/python/mypy/pull/18138/commits/c2af54f06b082974ed31b179d70ee8e7a13c3042
c2af54fhttps://github.com/python/mypy/pull/18138/commits/c2af54f06b082974ed31b179d70ee8e7a13c3042
https://github.com/sterliakov
Avoid passing boolean flags positionallyhttps://github.com/python/mypy/pull/18138/commits/70aa977fbb17527e218a6e0f475dca455422114f
70aa977https://github.com/python/mypy/pull/18138/commits/70aa977fbb17527e218a6e0f475dca455422114f
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Nov 15, 2024https://github.com/python/mypy/pull/18138#issuecomment-2479664042
mypy_primerhttps://github.com/hauntsaninja/mypy_primer
Please reload this pagehttps://github.com/python/mypy/pull/18138
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
Nov 21, 2024 https://github.com/python/mypy/pull/18138#pullrequestreview-2451709610
View reviewed changes https://github.com/python/mypy/pull/18138/files/70aa977fbb17527e218a6e0f475dca455422114f
JukkaLhttps://github.com/JukkaL
https://github.com/python/mypy/pull/18138#pullrequestreview-2451709610
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/18138
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
08340c2https://github.com/python/mypy/commit/08340c29a939a203868d3abd5cfd997720228f32
Nov 21, 2024https://github.com/python/mypy/pull/18138#event-15383349917
Attribute of type A | B | None becomes object after narrowing checks #12009 https://github.com/python/mypy/issues/12009
Regression with type narrowing of bool #11839 https://github.com/python/mypy/issues/11839
https://github.com/cdce8p
cdce8phttps://github.com/cdce8p
Dec 9, 2024 https://github.com/python/mypy/pull/18138#ref-pullrequest-2727234368
Add regression test for isinstance narrowing #18272 https://github.com/python/mypy/pull/18272
JelleZijlstrahttps://github.com/JelleZijlstra
Dec 9, 2024 https://github.com/python/mypy/pull/18138#ref-commit-ac89577
https://github.com/cdce8p
Add regression test for isinstance narrowing (https://github.com/python/mypy/commit/ac8957755a35a255f638c122e22c03b0e75b9a79
#18272https://github.com/python/mypy/pull/18272
)https://github.com/python/mypy/commit/ac8957755a35a255f638c122e22c03b0e75b9a79
ac89577https://github.com/python/mypy/commit/ac8957755a35a255f638c122e22c03b0e75b9a79
#11839https://github.com/python/mypy/issues/11839
#18138https://github.com/python/mypy/pull/18138
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Dec 28, 2024 https://github.com/python/mypy/pull/18138#ref-issue-343245827
Mypy forgets type information after a nested if-statement. #5378 https://github.com/python/mypy/issues/5378
https://github.com/sterliakov
sterliakovhttps://github.com/sterliakov
Jan 16, 2025 https://github.com/python/mypy/pull/18138#ref-issue-1994091476
attribute is incorrectly Any when ParamSpec decorated function is referenced in itself followed by an if statement with a class that has a method in it #16496 https://github.com/python/mypy/issues/16496
https://github.com/PetterS
PetterShttps://github.com/PetterS
Feb 23, 2025https://github.com/python/mypy/pull/18138#issuecomment-2676750145
Please reload this pagehttps://github.com/python/mypy/pull/18138
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Jun 27, 2025 https://github.com/python/mypy/pull/18138#ref-issue-623066277
Reachable code marked as unreachable in generic class with None type #8871 https://github.com/python/mypy/issues/8871
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%2F18138
https://github.com/JukkaL
JukkaL https://github.com/JukkaL
https://github.com/python/mypy/pull/18138/files/70aa977fbb17527e218a6e0f475dca455422114f
Please reload this pagehttps://github.com/python/mypy/pull/18138
False positive "Statement is unreachable" when checking if typevar is None https://github.com/python/mypy/issues/18126
Please reload this pagehttps://github.com/python/mypy/pull/18138
https://github.com/sterliakov
https://github.com/PetterS
https://github.com/JukkaL
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.