René's URL Explorer Experiment


Title: Move the join-based narrowing logic towards a union-based narrowing logic. by tyralla · Pull Request #18212 · python/mypy · GitHub

Open Graph Title: Move the join-based narrowing logic towards a union-based narrowing logic. by tyralla · Pull Request #18212 · python/mypy

X Title: Move the join-based narrowing logic towards a union-based narrowing logic. by tyralla · Pull Request #18212 · python/mypy

Description: Fixes #16379 Only a modest change. PR #18180 brought me to issue #18238. Trying to fix the latter revealed inconsistencies between join-style and union-style narrowing, so I decided to deal with this issue first. And here is the (maybe too simple?) solution... Regarding the primer output: For pandas, a (possibly debatable) false negative turns into a similar one. The affected pydantic and pymungo functions are complicated and not stringently typed. I would say the new error messages are okay, but I am not 100% sure.

Open Graph Description: Fixes #16379 Only a modest change. PR #18180 brought me to issue #18238. Trying to fix the latter revealed inconsistencies between join-style and union-style narrowing, so I decided to deal with ...

X Description: Fixes #16379 Only a modest change. PR #18180 brought me to issue #18238. Trying to fix the latter revealed inconsistencies between join-style and union-style narrowing, so I decided to deal with ...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:6c089061-e54e-481d-a950-bd05b8e950e3
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC4CC:210405:7013E7E:94AD8E3:6A5DF4AF
html-safe-nonceb1098f13dc58129ca1003088cc8a0f7b9d3d55829ee68f0a2aba7ce58755aabd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNENDOjIxMDQwNTo3MDEzRTdFOjk0QUQ4RTM6NkE1REY0QUYiLCJ2aXNpdG9yX2lkIjoiOTEyMDExNzQ5NDM4MDM2MDg3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6d0a3f3719de0f08ec78c277b110652c2da43a89caa7ae74dbe67aefa53e2d98
hovercard-subject-tagpull_request:2207695532
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///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/mypy/pull/18212/files
twitter:imagehttps://avatars.githubusercontent.com/u/25983587?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/25983587?s=400&v=4
og:image:altFixes #16379 Only a modest change. PR #18180 brought me to issue #18238. Trying to fix the latter revealed inconsistencies between join-style and union-style narrowing, so I decided to deal with ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7f8603048a7a8270fc5b845c28ec71e80a9a899268387bcf65814ee1b51c0cc4
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee2a5561aeb049d0632a92906af784af5d414c603
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/mypy/pull/18212/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F18212%2Ffiles
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
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%2F18212%2Ffiles
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%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fmypy
Reloadhttps://github.com/python/mypy/pull/18212/files
Reloadhttps://github.com/python/mypy/pull/18212/files
Reloadhttps://github.com/python/mypy/pull/18212/files
Please reload this pagehttps://github.com/python/mypy/pull/18212/files
python https://github.com/python
mypyhttps://github.com/python/mypy
Please reload this pagehttps://github.com/python/mypy/pull/18212/files
Notifications https://github.com/login?return_to=%2Fpython%2Fmypy
Fork 3.3k https://github.com/login?return_to=%2Fpython%2Fmypy
Star 20.5k 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 472 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
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fmypy%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fmypy%2Fissues%2Fnew%2Fchoose
tyrallahttps://github.com/tyralla
python:masterhttps://github.com/python/mypy/tree/master
tyralla:narrowing/move_join_based_narrowing_towards_union_based_narrowinghttps://github.com/tyralla/mypy/tree/narrowing/move_join_based_narrowing_towards_union_based_narrowing
Conversation 9 https://github.com/python/mypy/pull/18212
Commits 9 https://github.com/python/mypy/pull/18212/commits
Checks 0 https://github.com/python/mypy/pull/18212/checks
Files changed https://github.com/python/mypy/pull/18212/files
Please reload this pagehttps://github.com/python/mypy/pull/18212/files
Move the join-based narrowing logic towards a union-based narrowing logic. https://github.com/python/mypy/pull/18212/files#top
Show all changes 9 commits https://github.com/python/mypy/pull/18212/files
5891413 Move the join-based narrowing logic towards a union-based narrowing l… tyralla Nov 28, 2024 https://github.com/python/mypy/pull/18212/commits/5891413accb0b14c8209c3fe17ddaf492d945e3f
0e9f99f [pre-commit.ci] auto fixes from pre-commit.com hooks pre-commit-ci[bot] Nov 29, 2024 https://github.com/python/mypy/pull/18212/commits/0e9f99fdd0236f0001a8a4b45c9c0aceb4cd7954
d70a727 much softer approach tyralla Dec 1, 2024 https://github.com/python/mypy/pull/18212/commits/d70a727203d7e509f5e194a362cbaf867d7df21f
c418ad3 Merge remote-tracking branch 'mypypy/narrowing/move_join_based_narrow… tyralla Dec 1, 2024 https://github.com/python/mypy/pull/18212/commits/c418ad38934aef0247ba78ca2a065f05a6feef34
bf8e8b1 fix tyralla Dec 1, 2024 https://github.com/python/mypy/pull/18212/commits/bf8e8b1056e2b2b3f2cbf1309ad88ffd9624a35a
31a0401 module import tyralla Dec 2, 2024 https://github.com/python/mypy/pull/18212/commits/31a04014fac592ad0056a74d9d04c74c9642ab9c
121d8e1 add error message to assert tyralla Dec 2, 2024 https://github.com/python/mypy/pull/18212/commits/121d8e1e64676f1606e3f0f94273221d205dd61d
2c1b1a1 TupleType fallbacks as Instances, not Unions tyralla Dec 2, 2024 https://github.com/python/mypy/pull/18212/commits/2c1b1a10b0107b4ab2f566b0cfd0e91e148932d2
43ed94e Add test case that would crash without the previous commit tyralla Dec 2, 2024 https://github.com/python/mypy/pull/18212/commits/43ed94e692eb56bec169f0cec75e13b5fce466c8
Clear filters https://github.com/python/mypy/pull/18212/files
Please reload this pagehttps://github.com/python/mypy/pull/18212/files
Please reload this pagehttps://github.com/python/mypy/pull/18212/files
join.py https://github.com/python/mypy/pull/18212/files#diff-dc731faa017a06257ba26e3eacaf17e68a6078aeaf9755d1c06d917fe13ce457
check-narrowing.test https://github.com/python/mypy/pull/18212/files#diff-0413401ad6a91bc5c66579455009ba606ee0ddfb0a78278c9e53618c83b53ed5
check-redefine.test https://github.com/python/mypy/pull/18212/files#diff-f258b3b77d5328cb1a2461e883be36ae095986f0bc4eb2d5d113daaf001cb86a
mypy/join.pyhttps://github.com/python/mypy/pull/18212/files#diff-dc731faa017a06257ba26e3eacaf17e68a6078aeaf9755d1c06d917fe13ce457
View file https://github.com/tyralla/mypy/blob/43ed94e692eb56bec169f0cec75e13b5fce466c8/mypy/join.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/mypy/pull/18212/{{ revealButtonHref }}
https://github.com/python/mypy/pull/18212/files#diff-dc731faa017a06257ba26e3eacaf17e68a6078aeaf9755d1c06d917fe13ce457
https://github.com/python/mypy/pull/18212/files#diff-dc731faa017a06257ba26e3eacaf17e68a6078aeaf9755d1c06d917fe13ce457
https://github.com/python/mypy/pull/18212/files#diff-dc731faa017a06257ba26e3eacaf17e68a6078aeaf9755d1c06d917fe13ce457
https://github.com/python/mypy/pull/18212/files#diff-dc731faa017a06257ba26e3eacaf17e68a6078aeaf9755d1c06d917fe13ce457
https://github.com/python/mypy/pull/18212/files#diff-dc731faa017a06257ba26e3eacaf17e68a6078aeaf9755d1c06d917fe13ce457
https://github.com/python/mypy/pull/18212/files#diff-dc731faa017a06257ba26e3eacaf17e68a6078aeaf9755d1c06d917fe13ce457
https://github.com/python/mypy/pull/18212/files#diff-dc731faa017a06257ba26e3eacaf17e68a6078aeaf9755d1c06d917fe13ce457
https://github.com/python/mypy/pull/18212/files#diff-dc731faa017a06257ba26e3eacaf17e68a6078aeaf9755d1c06d917fe13ce457
test-data/unit/check-narrowing.testhttps://github.com/python/mypy/pull/18212/files#diff-0413401ad6a91bc5c66579455009ba606ee0ddfb0a78278c9e53618c83b53ed5
View file https://github.com/tyralla/mypy/blob/43ed94e692eb56bec169f0cec75e13b5fce466c8/test-data/unit/check-narrowing.test
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/mypy/pull/18212/{{ revealButtonHref }}
https://github.com/python/mypy/pull/18212/files#diff-0413401ad6a91bc5c66579455009ba606ee0ddfb0a78278c9e53618c83b53ed5
test-data/unit/check-redefine.testhttps://github.com/python/mypy/pull/18212/files#diff-f258b3b77d5328cb1a2461e883be36ae095986f0bc4eb2d5d113daaf001cb86a
View file https://github.com/tyralla/mypy/blob/43ed94e692eb56bec169f0cec75e13b5fce466c8/test-data/unit/check-redefine.test
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/mypy/pull/18212/{{ revealButtonHref }}
https://github.com/python/mypy/pull/18212/files#diff-f258b3b77d5328cb1a2461e883be36ae095986f0bc4eb2d5d113daaf001cb86a
https://github.com/python/mypy/pull/18212/files#diff-f258b3b77d5328cb1a2461e883be36ae095986f0bc4eb2d5d113daaf001cb86a
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.