René's URL Explorer Experiment


Title: Fix --warn-unreachable fall-through from ALWAYS_TRUE ifs by ammaraskar · Pull Request #18539 · python/mypy · GitHub

Open Graph Title: Fix --warn-unreachable fall-through from ALWAYS_TRUE ifs by ammaraskar · Pull Request #18539 · python/mypy

X Title: Fix --warn-unreachable fall-through from ALWAYS_TRUE ifs by ammaraskar · Pull Request #18539 · python/mypy

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

Open Graph Description: This is a quick swing at trying to fix #10773 Lots of details in my comment on the original issue and the commit message. This was a quick first approach that I came up with, it's not perfect. ...

X Description: This is a quick swing at trying to fix #10773 Lots of details in my comment on the original issue and the commit message. This was a quick first approach that I came up with, it's not perfe...

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

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:f4dae01b-1f5c-161c-0a4d-1109c36edab5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8EDA:100A0C:3822B:4957B:6A596A62
html-safe-nonce6a3e150d7d8839ad724eb407a349c4cc8b33d80ebf31c251512a59faa71d1161
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RURBOjEwMEEwQzozODIyQjo0OTU3Qjo2QTU5NkE2MiIsInZpc2l0b3JfaWQiOiIzNDUzMzc2OTkwMjMzMDYxOTg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac9dac2932c9412c153a5fe858cafb896f0a3d6c01602866dd381e0c0a238b4f8d
hovercard-subject-tagpull_request:2298763233
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/18539/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/d5ad00f123f89764f7b46b8af3a9d6365cbab9f958420a634a0438296b69e432/python/mypy/pull/18539
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d5ad00f123f89764f7b46b8af3a9d6365cbab9f958420a634a0438296b69e432/python/mypy/pull/18539
og:image:altThis is a quick swing at trying to fix #10773 Lots of details in my comment on the original issue and the commit message. This was a quick first approach that I came up with, it's not perfect. ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameammaraskar
hostnamegithub.com
expected-hostnamegithub.com
Nonea540949572872b935b393b36db38922db390ae71c859537d741b8f3eb7e545b5
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
release4aa391d605ba491481565840251a4b0fec3f4807
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/mypy/pull/18539#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F18539
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%2F18539
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/18539
Reloadhttps://github.com/python/mypy/pull/18539
Reloadhttps://github.com/python/mypy/pull/18539
Please reload this pagehttps://github.com/python/mypy/pull/18539
python https://github.com/python
mypyhttps://github.com/python/mypy
Please reload this pagehttps://github.com/python/mypy/pull/18539
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
ammaraskarhttps://github.com/ammaraskar
python:masterhttps://github.com/python/mypy/tree/master
ammaraskar:masterhttps://github.com/ammaraskar/mypy/tree/master
Conversationhttps://github.com/python/mypy/pull/18539
Commits8 (8)https://github.com/python/mypy/pull/18539/commits
Checkshttps://github.com/python/mypy/pull/18539/checks
Files changedhttps://github.com/python/mypy/pull/18539/files
Fix --warn-unreachable fall-through from ALWAYS_TRUE ifshttps://github.com/python/mypy/pull/18539#top
ammaraskarhttps://github.com/ammaraskar
python:masterhttps://github.com/python/mypy/tree/master
ammaraskar:masterhttps://github.com/ammaraskar/mypy/tree/master
https://github.com/ammaraskar
ammaraskarhttps://github.com/ammaraskar
Jan 26, 2025https://github.com/python/mypy/pull/18539#issue-2811729737
Please reload this pagehttps://github.com/python/mypy/pull/18539
#10773https://github.com/python/mypy/issues/10773
if MYPY guarding an always-return block v. unreachable #11380https://github.com/python/mypy/issues/11380
Platform check is not remembered after return #14940https://github.com/python/mypy/issues/14940
(🐞) Artificially literal bools not considered when performing reachability checks where branch terminates #12365https://github.com/python/mypy/issues/12365
@A5rockshttps://github.com/A5rocks
Please reload this pagehttps://github.com/python/mypy/pull/18539
ammaraskarhttps://github.com/ammaraskar
January 26, 2025 13:47https://github.com/python/mypy/pull/18539#commits-pushed-afe6d12
https://github.com/ammaraskar
Fix --warn-unreachable fall-through from ALWAYS_TRUE ifshttps://github.com/python/mypy/pull/18539/commits/afe6d12cfa12b7ca8c7a2aec9b957ee399a27b55
afe6d12https://github.com/python/mypy/pull/18539/commits/afe6d12cfa12b7ca8c7a2aec9b957ee399a27b55
https://github.com/marketplace/pre-commit-ci
[pre-commit.ci] auto fixes from pre-commit.com hookshttps://github.com/python/mypy/pull/18539/commits/efe5b2afb2777c8ec900a441dfd0a9e7eee114fb
efe5b2ahttps://github.com/python/mypy/pull/18539/commits/efe5b2afb2777c8ec900a441dfd0a9e7eee114fb
https://pre-commit.cihttps://pre-commit.ci
https://github.com/ammaraskar
Fix type checking issueshttps://github.com/python/mypy/pull/18539/commits/2570bbee187adba615aee9b4c04b783feee037a7
2570bbehttps://github.com/python/mypy/pull/18539/commits/2570bbee187adba615aee9b4c04b783feee037a7
https://github.com/ammaraskar
ammaraskarhttps://github.com/ammaraskar
January 26, 2025 19:17https://github.com/python/mypy/pull/18539#event-16070864976
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F18539
https://github.com/ammaraskar
Use suppress_unreachable_warnings instead of marking reachablehttps://github.com/python/mypy/pull/18539/commits/07e62f38fd18f1eb7d800c8fdbe69c23de5d27aa
07e62f3https://github.com/python/mypy/pull/18539/commits/07e62f38fd18f1eb7d800c8fdbe69c23de5d27aa
https://github.com/ammaraskar
ammaraskarhttps://github.com/ammaraskar
Jan 26, 2025https://github.com/python/mypy/pull/18539#issuecomment-2614561545
Please reload this pagehttps://github.com/python/mypy/pull/18539
https://github.com/python-poetry/poetry/blob/603646c64601eb49886a97f6e930aba2cc520475/src/poetry/utils/helpers.py#L294-L314https://github.com/python-poetry/poetry/blob/603646c64601eb49886a97f6e930aba2cc520475/src/poetry/utils/helpers.py#L294-L314
Please reload this pagehttps://github.com/python/mypy/pull/18539
https://github.com/ammaraskar
Add test case for running on fictional platform where unreachable get…https://github.com/python/mypy/pull/18539/commits/51756c023036863b10a3430592fe8554bf29f4c7
51756c0https://github.com/python/mypy/pull/18539/commits/51756c023036863b10a3430592fe8554bf29f4c7
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F18539
https://github.com/ammaraskar
ammaraskarhttps://github.com/ammaraskar
Jan 26, 2025 https://github.com/python/mypy/pull/18539#ref-pullrequest-2808947255
Enable warn_unreachable for mypy self-check #18523 https://github.com/python/mypy/pull/18523
https://github.com/A5rocks
A5rockshttps://github.com/A5rocks
Jan 26, 2025https://github.com/python/mypy/pull/18539#issuecomment-2614601273
Please reload this pagehttps://github.com/python/mypy/pull/18539
Please reload this pagehttps://github.com/python/mypy/pull/18539
ammaraskarhttps://github.com/ammaraskar
January 26, 2025 18:26https://github.com/python/mypy/pull/18539#commits-pushed-3d6ecd0
https://github.com/ammaraskar
https://github.com/A5rocks
Use A5rock's approach of marking semanal unreachability.https://github.com/python/mypy/pull/18539/commits/3d6ecd0b6548792a32d1e599318485dc614686e1
3d6ecd0https://github.com/python/mypy/pull/18539/commits/3d6ecd0b6548792a32d1e599318485dc614686e1
https://github.com/ammaraskar
Remove old field typehttps://github.com/python/mypy/pull/18539/commits/ea87eef0643a3615c94c75b0764dc200c99b3d5a
ea87eefhttps://github.com/python/mypy/pull/18539/commits/ea87eef0643a3615c94c75b0764dc200c99b3d5a
https://github.com/ammaraskar
ammaraskarhttps://github.com/ammaraskar
Jan 26, 2025https://github.com/python/mypy/pull/18539#issuecomment-2614633380
Please reload this pagehttps://github.com/python/mypy/pull/18539
Please reload this pagehttps://github.com/python/mypy/pull/18539
https://github.com/A5rocks
A5rockshttps://github.com/A5rocks
Jan 26, 2025https://github.com/python/mypy/pull/18539#issuecomment-2614633928
Please reload this pagehttps://github.com/python/mypy/pull/18539
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F18539
https://github.com/A5rocks
A5rockshttps://github.com/A5rocks
Jan 27, 2025https://github.com/python/mypy/pull/18539#issuecomment-2614646408
Please reload this pagehttps://github.com/python/mypy/pull/18539
Please reload this pagehttps://github.com/python/mypy/pull/18539
https://github.com/A5rocks
A5rockshttps://github.com/A5rocks
Jan 27, 2025https://github.com/python/mypy/pull/18539#issuecomment-2614726981
if MYPY guarding an always-return block v. unreachable #11380https://github.com/python/mypy/issues/11380
(🐞) Artificially literal bools not considered when performing reachability checks where branch terminates #12365https://github.com/python/mypy/issues/12365
Platform check is not remembered after return #14940https://github.com/python/mypy/issues/14940
Please reload this pagehttps://github.com/python/mypy/pull/18539
https://github.com/ammaraskar
ammaraskarhttps://github.com/ammaraskar
Jan 27, 2025https://github.com/python/mypy/pull/18539#issuecomment-2616154185
Please reload this pagehttps://github.com/python/mypy/pull/18539
Please reload this pagehttps://github.com/python/mypy/pull/18539
https://github.com/A5rocks
A5rockshttps://github.com/A5rocks
Feb 24, 2025 https://github.com/python/mypy/pull/18539#pullrequestreview-2635960844
View reviewed changes https://github.com/python/mypy/pull/18539/files/ea87eef0643a3615c94c75b0764dc200c99b3d5a
mypy/binder.pyhttps://github.com/python/mypy/pull/18539/files/ea87eef0643a3615c94c75b0764dc200c99b3d5a#diff-cec7c57fef20b803fc1c4e988ad3971b3597f1fd1b12db07b47f825046f264f5
A5rockshttps://github.com/A5rocks
Feb 24, 2025https://github.com/python/mypy/pull/18539#discussion_r1967008646
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
#18707https://github.com/python/mypy/pull/18707
Please reload this pagehttps://github.com/python/mypy/pull/18539
https://github.com/A5rocks
A5rockshttps://github.com/A5rocks
Oct 13, 2025https://github.com/python/mypy/pull/18539#issuecomment-3398685511
@ammaraskarhttps://github.com/ammaraskar
Please reload this pagehttps://github.com/python/mypy/pull/18539
https://github.com/A5rocks
A5rockshttps://github.com/A5rocks
topic-reachability https://github.com/python/mypy/issues?q=state%3Aopen%20label%3Atopic-reachability
Oct 13, 2025https://github.com/python/mypy/pull/18539#event-20253684774
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F18539
https://github.com/ammaraskar
ammaraskarhttps://github.com/ammaraskar
Oct 13, 2025https://github.com/python/mypy/pull/18539#issuecomment-3398912759
Please reload this pagehttps://github.com/python/mypy/pull/18539
https://github.com/ammaraskar
Merge branch 'master' of github.com:python/mypyhttps://github.com/python/mypy/pull/18539/commits/20e7e0a3f01aca60a9acde04513c631eb803530d
20e7e0ahttps://github.com/python/mypy/pull/18539/commits/20e7e0a3f01aca60a9acde04513c631eb803530d
https://github.com/ammaraskar
ammaraskarhttps://github.com/ammaraskar
force-pushedhttps://github.com/python/mypy/compare/4892c3bbc7b90db1a641be246237e6ac7d21e6cd..20e7e0a3f01aca60a9acde04513c631eb803530d
4892c3bhttps://github.com/python/mypy/commit/4892c3bbc7b90db1a641be246237e6ac7d21e6cd
20e7e0ahttps://github.com/python/mypy/commit/20e7e0a3f01aca60a9acde04513c631eb803530d
Compare https://github.com/python/mypy/compare/4892c3bbc7b90db1a641be246237e6ac7d21e6cd..20e7e0a3f01aca60a9acde04513c631eb803530d
October 14, 2025 02:08https://github.com/python/mypy/pull/18539#event-20258854269
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Oct 14, 2025https://github.com/python/mypy/pull/18539#issuecomment-3399866760
mypy_primerhttps://github.com/hauntsaninja/mypy_primer
Please reload this pagehttps://github.com/python/mypy/pull/18539
https://github.com/ammaraskar
ammaraskarhttps://github.com/ammaraskar
Oct 14, 2025https://github.com/python/mypy/pull/18539#issuecomment-3399959500
Please reload this pagehttps://github.com/python/mypy/pull/18539
https://github.com/A5rocks
A5rockshttps://github.com/A5rocks
Dec 14, 2025 https://github.com/python/mypy/pull/18539#ref-issue-3726468375
unexpected attr-defined error in imports in dead code #20408 https://github.com/python/mypy/issues/20408
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%2F18539
https://github.com/A5rocks
A5rocks https://github.com/A5rocks
https://github.com/python/mypy/pull/18539/files/ea87eef0643a3615c94c75b0764dc200c99b3d5a
topic-reachability https://github.com/python/mypy/issues?q=state%3Aopen%20label%3Atopic-reachability
Platform check is not remembered after return https://github.com/python/mypy/issues/14940
(🐞) Artificially literal bools not considered when performing reachability checks where branch terminates https://github.com/python/mypy/issues/12365
if MYPY guarding an always-return block v. unreachable https://github.com/python/mypy/issues/11380
warn-unreachable behaves differently on else-return than on bare return https://github.com/python/mypy/issues/10773
Please reload this pagehttps://github.com/python/mypy/pull/18539
https://github.com/ammaraskar
https://github.com/A5rocks
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.