René's URL Explorer Experiment


Title: fix: isinstance narrowing regression with dynamic tuple argument by Bahtya · Pull Request #21190 · python/mypy · GitHub

Open Graph Title: fix: isinstance narrowing regression with dynamic tuple argument by Bahtya · Pull Request #21190 · python/mypy

X Title: fix: isinstance narrowing regression with dynamic tuple argument by Bahtya · Pull Request #21190 · python/mypy

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

Open Graph Description: Problem When isinstance is called with a dynamically-computed tuple of types (e.g. isinstance(exc, tuple(expected_excs))), mypy 1.20 incorrectly narrows the expression to object instead of keeping ...

X Description: Problem When isinstance is called with a dynamically-computed tuple of types (e.g. isinstance(exc, tuple(expected_excs))), mypy 1.20 incorrectly narrows the expression to object instead of keeping ...

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

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:207dbf81-25c7-5d83-e49a-986bf4ad2341
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE6B4:1E71B6:868FE6:BF51CB:6A5A0BA1
html-safe-nonce3389cac1fa1576e74c3f28ab71071c64c18b0a2928332f05d5e6953257145e1f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNkI0OjFFNzFCNjo4NjhGRTY6QkY1MUNCOjZBNUEwQkExIiwidmlzaXRvcl9pZCI6IjcyMDgxNzQ0ODE3NDYxOTU1MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac5ee5a82bf129494850bf8b3b80a2a2db8648999da094d8c0226f5b36bc4500a6
hovercard-subject-tagpull_request:3505795995
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/21190/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/53c5b08c4b948dee212ebb35d5e9c332eaa795df4ee56b3d4796920bd0f35e2c/python/mypy/pull/21190
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/53c5b08c4b948dee212ebb35d5e9c332eaa795df4ee56b3d4796920bd0f35e2c/python/mypy/pull/21190
og:image:altProblem When isinstance is called with a dynamically-computed tuple of types (e.g. isinstance(exc, tuple(expected_excs))), mypy 1.20 incorrectly narrows the expression to object instead of keeping ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameBahtya
hostnamegithub.com
expected-hostnamegithub.com
None8c2fe7351e4e987cb8f75e2425a0b895d807779bc4c2d3c312be0a54082219f7
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
release491710c7a8eecca9d0a06bd157646f2685d8c87b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/mypy/pull/21190#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F21190
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%2F21190
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/21190
Reloadhttps://github.com/python/mypy/pull/21190
Reloadhttps://github.com/python/mypy/pull/21190
Please reload this pagehttps://github.com/python/mypy/pull/21190
python https://github.com/python
mypyhttps://github.com/python/mypy
Please reload this pagehttps://github.com/python/mypy/pull/21190
Notifications https://github.com/login?return_to=%2Fpython%2Fmypy
Fork 3.2k 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 466 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
Bahtyahttps://github.com/Bahtya
python:masterhttps://github.com/python/mypy/tree/master
Bahtya:fix/isinstance-narrowing-union-classinfohttps://github.com/Bahtya/mypy/tree/fix/isinstance-narrowing-union-classinfo
Conversationhttps://github.com/python/mypy/pull/21190
Commits5 (5)https://github.com/python/mypy/pull/21190/commits
Checkshttps://github.com/python/mypy/pull/21190/checks
Files changedhttps://github.com/python/mypy/pull/21190/files
fix: isinstance narrowing regression with dynamic tuple argumenthttps://github.com/python/mypy/pull/21190#top
Bahtyahttps://github.com/Bahtya
python:masterhttps://github.com/python/mypy/tree/master
Bahtya:fix/isinstance-narrowing-union-classinfohttps://github.com/Bahtya/mypy/tree/fix/isinstance-narrowing-union-classinfo
https://github.com/Bahtya
Bahtyahttps://github.com/Bahtya
Apr 8, 2026https://github.com/python/mypy/pull/21190#issue-4228198258
#21181https://github.com/python/mypy/issues/21181
Please reload this pagehttps://github.com/python/mypy/pull/21190
Bahtyahttps://github.com/Bahtya
April 9, 2026 06:51https://github.com/python/mypy/pull/21190#commits-pushed-f650315
https://github.com/Bahtya
fix: isinstance narrowing regression with dynamic tuple argumenthttps://github.com/python/mypy/pull/21190/commits/f65031509997d7c05802c5996d7ced7e341beec7
f650315https://github.com/python/mypy/pull/21190/commits/f65031509997d7c05802c5996d7ced7e341beec7
#21181https://github.com/python/mypy/issues/21181
https://github.com/marketplace/pre-commit-ci
[pre-commit.ci] auto fixes from pre-commit.com hookshttps://github.com/python/mypy/pull/21190/commits/1d491f6bc4d6a8017848e23d2cedbcd5a825b988
1d491f6https://github.com/python/mypy/pull/21190/commits/1d491f6bc4d6a8017848e23d2cedbcd5a825b988
https://pre-commit.cihttps://pre-commit.ci
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F21190
https://github.com/Bahtya
Bahtyahttps://github.com/Bahtya
Apr 9, 2026 https://github.com/python/mypy/pull/21190#ref-pullrequest-4226929213
fix: prevent false unreachable error when comparing generic callables #21188 https://github.com/python/mypy/pull/21188
April 9, 2026 19:27https://github.com/python/mypy/pull/21190#commits-pushed-f1371ae
fix: resolve type checking errors in get_type_range_of_typehttps://github.com/python/mypy/pull/21190/commits/f1371ae3426de0ed0b09c76eb90cf401ee5ace9c
f1371aehttps://github.com/python/mypy/pull/21190/commits/f1371ae3426de0ed0b09c76eb90cf401ee5ace9c
https://github.com/marketplace/pre-commit-ci
[pre-commit.ci] auto fixes from pre-commit.com hookshttps://github.com/python/mypy/pull/21190/commits/94c063ca844b5f870df5174258100ebf5bc76c1e
94c063chttps://github.com/python/mypy/pull/21190/commits/94c063ca844b5f870df5174258100ebf5bc76c1e
https://pre-commit.cihttps://pre-commit.ci
fix: remove redundant get_proper_type() call in checker.pyhttps://github.com/python/mypy/pull/21190/commits/f00e8f86ac8c6296dfc25573bd2402f10ef0f55d
f00e8f8https://github.com/python/mypy/pull/21190/commits/f00e8f86ac8c6296dfc25573bd2402f10ef0f55d
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Apr 9, 2026https://github.com/python/mypy/pull/21190#issuecomment-4214037224
mypy_primerhttps://github.com/hauntsaninja/mypy_primer
Please reload this pagehttps://github.com/python/mypy/pull/21190
https://github.com/Bahtya
Bahtyahttps://github.com/Bahtya
Apr 9, 2026https://github.com/python/mypy/pull/21190#issuecomment-4216180913
[1.20 regression] when same object is narrowed multiple times #21181https://github.com/python/mypy/issues/21181
Please reload this pagehttps://github.com/python/mypy/pull/21190
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
pending https://github.com/python/mypy/issues?q=state%3Aopen%20label%3Apending
Apr 10, 2026https://github.com/python/mypy/pull/21190#event-24361254513
https://github.com/Bahtya
Bahtyahttps://github.com/Bahtya
Apr 13, 2026https://github.com/python/mypy/pull/21190#issuecomment-4236412178
Please reload this pagehttps://github.com/python/mypy/pull/21190
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Apr 16, 2026https://github.com/python/mypy/pull/21190#issuecomment-4256974124
#21242https://github.com/python/mypy/pull/21242
Please reload this pagehttps://github.com/python/mypy/pull/21190
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Apr 16, 2026https://github.com/python/mypy/pull/21190#event-24550790877
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%2F21190
pending https://github.com/python/mypy/issues?q=state%3Aopen%20label%3Apending
[1.20 regression] when same object is narrowed multiple times https://github.com/python/mypy/issues/21181
Please reload this pagehttps://github.com/python/mypy/pull/21190
https://github.com/Bahtya
https://github.com/hauntsaninja
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.