René's URL Explorer Experiment


Title: Avoid using `isinstance()` checks with `FuncBase` for type narrowing by AlexWaygood · Pull Request #13607 · python/mypy · GitHub

Open Graph Title: Avoid using `isinstance()` checks with `FuncBase` for type narrowing by AlexWaygood · Pull Request #13607 · python/mypy

X Title: Avoid using `isinstance()` checks with `FuncBase` for type narrowing by AlexWaygood · Pull Request #13607 · python/mypy

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

Open Graph Description: This PR improves mypy's understanding of the mypy codebase, and reduces the number of false positives if you run the selfcheck with --warn-unreachable. As stated in this docstring here, mypy d...

X Description: This PR improves mypy's understanding of the mypy codebase, and reduces the number of false positives if you run the selfcheck with --warn-unreachable. As stated in this docstring here, my...

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

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:6e6f9f32-9f54-e9f0-2bec-3ef05c541423
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD584:18108C:34C2C:497DC:6A5A3E9B
html-safe-nonce0a7ef53516d3a8c892321a2f90a2b069299c8635ebb079732011729fc27a3ea7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTg0OjE4MTA4QzozNEMyQzo0OTdEQzo2QTVBM0U5QiIsInZpc2l0b3JfaWQiOiI4NzE0MDA2ODU3NDExODcwMzYzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacdbefe936076dc04f056de15477bec8c22ef73c8d22b1542fa0891058d8204639
hovercard-subject-tagpull_request:1045667472
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/13607/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/58f527bd4c368ee08d9b02f86d30b8d238c6ae424bf1c5e3aa732692ed1ede3b/python/mypy/pull/13607
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/58f527bd4c368ee08d9b02f86d30b8d238c6ae424bf1c5e3aa732692ed1ede3b/python/mypy/pull/13607
og:image:altThis PR improves mypy's understanding of the mypy codebase, and reduces the number of false positives if you run the selfcheck with --warn-unreachable. As stated in this docstring here, mypy d...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAlexWaygood
hostnamegithub.com
expected-hostnamegithub.com
None19c67ad7579d2401ff06e88a32ef45460fbb40fab3191c7f7582d5e166f326fc
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
releasee618485bff22dab2ef1ffb4e34e4e6626688df69
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/mypy/pull/13607#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F13607
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%2F13607
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/13607
Reloadhttps://github.com/python/mypy/pull/13607
Reloadhttps://github.com/python/mypy/pull/13607
Please reload this pagehttps://github.com/python/mypy/pull/13607
python https://github.com/python
mypyhttps://github.com/python/mypy
Please reload this pagehttps://github.com/python/mypy/pull/13607
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 467 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
AlexWaygoodhttps://github.com/AlexWaygood
python:masterhttps://github.com/python/mypy/tree/master
AlexWaygood:funcbase-unreachablehttps://github.com/AlexWaygood/mypy/tree/funcbase-unreachable
Conversationhttps://github.com/python/mypy/pull/13607
Commits1 (1)https://github.com/python/mypy/pull/13607/commits
Checkshttps://github.com/python/mypy/pull/13607/checks
Files changedhttps://github.com/python/mypy/pull/13607/files
Avoid using isinstance() checks with FuncBase for type narrowinghttps://github.com/python/mypy/pull/13607#top
AlexWaygoodhttps://github.com/AlexWaygood
python:masterhttps://github.com/python/mypy/tree/master
AlexWaygood:funcbase-unreachablehttps://github.com/AlexWaygood/mypy/tree/funcbase-unreachable
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Sep 4, 2022https://github.com/python/mypy/pull/13607#issue-1361100267
mypy/mypy/nodes.pyhttps://github.com/python/mypy/blob/130e1a4e6fc5b14fda625495e25abd177af61bbb/mypy/nodes.py#L528-L536
130e1a4https://github.com/python/mypy/commit/130e1a4e6fc5b14fda625495e25abd177af61bbb
Please reload this pagehttps://github.com/python/mypy/pull/13607
https://github.com/AlexWaygood
Avoid using isinstance() checks with FuncBase for type narrowinghttps://github.com/python/mypy/pull/13607/commits/4107065bf9aa9be28623afbec5e205a9b1940c02
4107065https://github.com/python/mypy/pull/13607/commits/4107065bf9aa9be28623afbec5e205a9b1940c02
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Sep 4, 2022https://github.com/python/mypy/pull/13607#issuecomment-1236306287
mypy_primerhttps://github.com/hauntsaninja/mypy_primer
Please reload this pagehttps://github.com/python/mypy/pull/13607
https://github.com/sobolevn
sobolevnhttps://github.com/sobolevn
Sep 4, 2022 https://github.com/python/mypy/pull/13607#pullrequestreview-1095653830
View reviewed changes https://github.com/python/mypy/pull/13607/files/4107065bf9aa9be28623afbec5e205a9b1940c02
sobolevnhttps://github.com/sobolevn
https://github.com/python/mypy/pull/13607#pullrequestreview-1095653830
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
#3603https://github.com/python/mypy/issues/3603
Please reload this pagehttps://github.com/python/mypy/pull/13607
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Sep 4, 2022https://github.com/python/mypy/pull/13607#issuecomment-1236317726
#3603https://github.com/python/mypy/issues/3603
Please reload this pagehttps://github.com/python/mypy/pull/13607
https://github.com/Michael0x2a
Michael0x2ahttps://github.com/Michael0x2a
Sep 4, 2022https://github.com/python/mypy/pull/13607#issuecomment-1236357236
Please reload this pagehttps://github.com/python/mypy/pull/13607
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
September 4, 2022 16:31https://github.com/python/mypy/pull/13607#event-7318676647
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Sep 4, 2022https://github.com/python/mypy/pull/13607#issuecomment-1236376305
@Michael0x2ahttps://github.com/Michael0x2a
#12802https://github.com/python/mypy/issues/12802
Please reload this pagehttps://github.com/python/mypy/pull/13607
https://github.com/sobolevn
sobolevnhttps://github.com/sobolevn
Sep 7, 2022 https://github.com/python/mypy/pull/13607#ref-issue-1364890280
Cannot infer type of generic attributes in match statements when inheritance is involved #13620 https://github.com/python/mypy/issues/13620
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Jan 22, 2023https://github.com/python/mypy/pull/13607#issuecomment-1399567153
Please reload this pagehttps://github.com/python/mypy/pull/13607
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Jan 22, 2023https://github.com/python/mypy/pull/13607#event-8329311405
https://github.com/A5rocks
A5rockshttps://github.com/A5rocks
Jan 25, 2025 https://github.com/python/mypy/pull/13607#ref-pullrequest-2808947255
Enable warn_unreachable for mypy self-check #18523 https://github.com/python/mypy/pull/18523
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
January 26, 2025 09:03https://github.com/python/mypy/pull/13607#event-16069288210
https://github.com/A5rocks
A5rockshttps://github.com/A5rocks
Oct 13, 2025 https://github.com/python/mypy/pull/13607#ref-issue-3511223275
Union interacts poorly with isinstance-based unreachability #20057 https://github.com/python/mypy/issues/20057
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%2F13607
https://github.com/sobolevn
sobolevn https://github.com/sobolevn
https://github.com/python/mypy/pull/13607/files/4107065bf9aa9be28623afbec5e205a9b1940c02
Please reload this pagehttps://github.com/python/mypy/pull/13607
https://github.com/AlexWaygood
https://github.com/Michael0x2a
https://github.com/sobolevn
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.