| route-pattern | /_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format) |
| route-controller | voltron_pull_requests_fragments |
| route-action | pull_request_layout |
| fetch-nonce | v2:00c6b1ef-6ad3-230a-cfe2-747a849016da |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C9AA:171905:3A89A6:4DB7BE:6A5B2808 |
| html-safe-nonce | c945ed2ddd39d61aa37e0fa60c08d5abe5ed0b6b24b8be41b1aee62040ac0d2a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUFBOjE3MTkwNTozQTg5QTY6NERCN0JFOjZBNUIyODA4IiwidmlzaXRvcl9pZCI6IjMzMDM4MTEyNjUzMjAzOTY4MDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a9ac3a565b573e18923b4c57c7155efc89c0af6cca190386684ed096f61e8688 |
| hovercard-subject-tag | pull_request:2581781814 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///voltron/pull_requests_fragments/pull_request_layout |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/mypy/19270/pull_request_layout |
| twitter:image | https://opengraph.githubassets.com/97c95cf986937e93353f893aa0896d197029f0c902d78d29135c78ef3dfcdba2/python/mypy/pull/19270 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/97c95cf986937e93353f893aa0896d197029f0c902d78d29135c78ef3dfcdba2/python/mypy/pull/19270 |
| og:image:alt | Fixes #19269
This PR refactors the logic implemented in #19118 (which only targeted repeatedly checked loops) and applies it to repeatedly checked finally clauses.
I moved nearly all relevant code ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tyralla |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-cache |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/mypy/pull/19270#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F19270 |
| GitHub CopilotWrite better code with AI | https://github.com/features/copilot |
| GitHub Copilot appDirect agents from issue to merge | https://github.com/features/ai/github-app |
| MCP RegistryNewIntegrate external tools | https://github.com/mcp |
| ActionsAutomate any workflow | https://github.com/features/actions |
| CodespacesInstant dev environments | https://github.com/features/codespaces |
| IssuesPlan and track work | https://github.com/features/issues |
| Code ReviewManage code changes | https://github.com/features/code-review |
| GitHub Advanced SecurityFind and fix vulnerabilities | https://github.com/security/advanced-security |
| Code securitySecure your code as you build | https://github.com/security/advanced-security/code-security |
| Secret protectionStop leaks before they start | https://github.com/security/advanced-security/secret-protection |
| Why GitHub | https://github.com/why-github |
| Documentation | https://docs.github.com |
| Blog | https://github.blog |
| Changelog | https://github.blog/changelog |
| Marketplace | https://github.com/marketplace |
| View all features | https://github.com/features |
| Enterprises | https://github.com/enterprise |
| Small and medium teams | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| App Modernization | https://github.com/solutions/use-case/app-modernization |
| DevSecOps | https://github.com/solutions/use-case/devsecops |
| DevOps | https://github.com/solutions/use-case/devops |
| CI/CD | https://github.com/solutions/use-case/ci-cd |
| View all use cases | https://github.com/solutions/use-case |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| View all industries | https://github.com/solutions/industry |
| View all solutions | https://github.com/solutions |
| AI | https://github.com/resources/articles?topic=ai |
| Software Development | https://github.com/resources/articles?topic=software-development |
| DevOps | https://github.com/resources/articles?topic=devops |
| Security | https://github.com/resources/articles?topic=security |
| View all topics | https://github.com/resources/articles |
| Customer stories | https://github.com/customer-stories |
| Events & webinars | https://github.com/resources/events |
| Ebooks & reports | https://github.com/resources/whitepapers |
| Business insights | https://github.com/solutions/executive-insights |
| GitHub Skills | https://skills.github.com |
| Documentation | https://docs.github.com |
| Customer support | https://support.github.com |
| Community forum | https://github.com/orgs/community/discussions |
| Trust center | https://github.com/trust-center |
| Partners | https://github.com/partners |
| View all resources | https://github.com/resources |
| GitHub SponsorsFund open source developers | https://github.com/open-source/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/open-source/accelerator |
| GitHub Stars | https://stars.github.com |
| Archive Program | https://archiveprogram.github.com |
| Topics | https://github.com/topics |
| Trending | https://github.com/trending |
| Collections | https://github.com/collections |
| Enterprise platformAI-powered developer platform | https://github.com/enterprise |
| GitHub Advanced SecurityEnterprise-grade security features | https://github.com/security/advanced-security |
| Copilot for BusinessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Pricing | https://github.com/pricing |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://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%2F19270 |
|
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 |
| Reload | https://github.com/python/mypy/pull/19270 |
| Reload | https://github.com/python/mypy/pull/19270 |
| Reload | https://github.com/python/mypy/pull/19270 |
| Please reload this page | https://github.com/python/mypy/pull/19270 |
|
python
| https://github.com/python |
| mypy | https://github.com/python/mypy |
| Please reload this page | https://github.com/python/mypy/pull/19270 |
|
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 |
| JukkaL | https://github.com/JukkaL |
| python:master | https://github.com/python/mypy/tree/master |
| tyralla:fix/narrowing_unreachable_try_finally | https://github.com/tyralla/mypy/tree/fix/narrowing_unreachable_try_finally |
| Conversation | https://github.com/python/mypy/pull/19270 |
| Commits7 (7) | https://github.com/python/mypy/pull/19270/commits |
| Checks | https://github.com/python/mypy/pull/19270/checks |
| Files changed | https://github.com/python/mypy/pull/19270/files |
| Improve the handling of "iteration dependent" errors and notes in finally clauses. | https://github.com/python/mypy/pull/19270#top |
| JukkaL | https://github.com/JukkaL |
| python:master | https://github.com/python/mypy/tree/master |
| tyralla:fix/narrowing_unreachable_try_finally | https://github.com/tyralla/mypy/tree/fix/narrowing_unreachable_try_finally |
|
| https://github.com/tyralla |
| tyralla | https://github.com/tyralla |
| Jun 10, 2025 | https://github.com/python/mypy/pull/19270#issue-3134056596 |
| #19269 | https://github.com/python/mypy/issues/19269 |
| #19118 | https://github.com/python/mypy/pull/19118 |
| Please reload this page | https://github.com/python/mypy/pull/19270 |
| tyralla | https://github.com/tyralla |
| June 10, 2025 07:09 | https://github.com/python/mypy/pull/19270#commits-pushed-71a3b28 |
|
| https://github.com/tyralla |
| Improve the handling of "iteration dependend" errors and notes in fin… | https://github.com/python/mypy/pull/19270/commits/71a3b280aa7d0f4d44ec642ddd29048b50c85c75 |
| 71a3b28 | https://github.com/python/mypy/pull/19270/commits/71a3b280aa7d0f4d44ec642ddd29048b50c85c75 |
|
| https://github.com/marketplace/pre-commit-ci |
| [pre-commit.ci] auto fixes from pre-commit.com hooks | https://github.com/python/mypy/pull/19270/commits/fc1c79075d1957d869b620fe3b3d9d7df99e9148 |
| fc1c790 | https://github.com/python/mypy/pull/19270/commits/fc1c79075d1957d869b620fe3b3d9d7df99e9148 |
| https://pre-commit.ci | https://pre-commit.ci |
| https://github.com/tyralla |
| tyralla | https://github.com/tyralla |
| Jun 10, 2025 | https://github.com/python/mypy/pull/19270#issuecomment-2959778461 |
| #19256 | https://github.com/python/mypy/issues/19256 |
| Please reload this page | https://github.com/python/mypy/pull/19270 |
| https://github.com/tyralla |
| tyralla | https://github.com/tyralla |
| Jun 10, 2025 | https://github.com/python/mypy/pull/19270#event-18078503467 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F19270 |
| https://github.com/tyralla |
| tyralla | https://github.com/tyralla |
| Jun 10, 2025 | https://github.com/python/mypy/pull/19270#issuecomment-2959958351 |
| @A5rocks | https://github.com/A5rocks |
| @JukkaL | https://github.com/JukkaL |
| #19118 | https://github.com/python/mypy/pull/19118 |
| Please reload this page | https://github.com/python/mypy/pull/19270 |
| https://github.com/tyralla |
| tyralla | https://github.com/tyralla |
| A5rocks | https://github.com/A5rocks |
| JukkaL | https://github.com/JukkaL |
| June 10, 2025 16:41 | https://github.com/python/mypy/pull/19270#event-18079296862 |
| tyralla | https://github.com/tyralla |
| June 10, 2025 18:52 | https://github.com/python/mypy/pull/19270#commits-pushed-84de3bb |
|
| https://github.com/tyralla |
| Merge branch 'master' into fix/narrowing_unreachable_try_finally | https://github.com/python/mypy/pull/19270/commits/84de3bba381b2721869e59b04ab6ae02a12f7ad2 |
| 84de3bb | https://github.com/python/mypy/pull/19270/commits/84de3bba381b2721869e59b04ab6ae02a12f7ad2 |
|
| https://github.com/tyralla |
| fix typo | https://github.com/python/mypy/pull/19270/commits/2ddab269cd9dd7a6c447c956fd90d781d79755e7 |
| 2ddab26 | https://github.com/python/mypy/pull/19270/commits/2ddab269cd9dd7a6c447c956fd90d781d79755e7 |
|
| https://github.com/marketplace/pre-commit-ci |
| [pre-commit.ci] auto fixes from pre-commit.com hooks | https://github.com/python/mypy/pull/19270/commits/0b6f6b96eba700315e6aa734787ddd1538c382ca |
| 0b6f6b9 | https://github.com/python/mypy/pull/19270/commits/0b6f6b96eba700315e6aa734787ddd1538c382ca |
| https://pre-commit.ci | https://pre-commit.ci |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F19270 |
| https://github.com/tyralla |
| tyralla | https://github.com/tyralla |
|
Jun 12, 2025
| https://github.com/python/mypy/pull/19270#ref-issue-3128687430 |
|
Unreachability should work for constrained type vars
#19256
| https://github.com/python/mypy/issues/19256 |
|
| https://github.com/tyralla |
| Merge branch 'master' into fix/narrowing_unreachable_try_finally | https://github.com/python/mypy/pull/19270/commits/435b1f533338304c2e58c1581719dc43b6ae06bc |
| 435b1f5 | https://github.com/python/mypy/pull/19270/commits/435b1f533338304c2e58c1581719dc43b6ae06bc |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F19270 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jun 18, 2025
| https://github.com/python/mypy/pull/19270#ref-issue-3150899916 |
|
1.17 Release Planning
#19306
| https://github.com/python/mypy/issues/19306 |
| https://github.com/JukkaL |
| JukkaL | https://github.com/JukkaL |
|
Jun 19, 2025
| https://github.com/python/mypy/pull/19270#pullrequestreview-2943478702 |
|
View reviewed changes
| https://github.com/python/mypy/pull/19270/files/435b1f533338304c2e58c1581719dc43b6ae06bc |
| JukkaL | https://github.com/JukkaL |
| https://github.com/python/mypy/pull/19270#pullrequestreview-2943478702 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/mypy/pull/19270 |
| mypy/errors.py | https://github.com/python/mypy/pull/19270/files/435b1f533338304c2e58c1581719dc43b6ae06bc#diff-eef80074ed3627574b7a784f0e2a4e9d4670e7c2156f559ada501980ea5d1ca2 |
| JukkaL | https://github.com/JukkaL |
| Jun 19, 2025 | https://github.com/python/mypy/pull/19270#discussion_r2157291732 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/mypy/pull/19270 |
| tyralla | https://github.com/tyralla |
| Jun 20, 2025 | https://github.com/python/mypy/pull/19270#discussion_r2158194592 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/mypy/pull/19270 |
| mypy/errors.py | https://github.com/python/mypy/pull/19270/files/435b1f533338304c2e58c1581719dc43b6ae06bc#diff-eef80074ed3627574b7a784f0e2a4e9d4670e7c2156f559ada501980ea5d1ca2 |
| JukkaL | https://github.com/JukkaL |
| Jun 19, 2025 | https://github.com/python/mypy/pull/19270#discussion_r2157301238 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/mypy/pull/19270 |
| mypy/errors.py | https://github.com/python/mypy/pull/19270/files/435b1f533338304c2e58c1581719dc43b6ae06bc#diff-eef80074ed3627574b7a784f0e2a4e9d4670e7c2156f559ada501980ea5d1ca2 |
| JukkaL | https://github.com/JukkaL |
| Jun 19, 2025 | https://github.com/python/mypy/pull/19270#discussion_r2157308973 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/mypy/pull/19270 |
|
| https://github.com/tyralla |
| Support the "or syntax" for revealed unions. | https://github.com/python/mypy/pull/19270/commits/af8b672ab2a89630be56c1494bea0877cad7c507 |
| af8b672 | https://github.com/python/mypy/pull/19270/commits/af8b672ab2a89630be56c1494bea0877cad7c507 |
| https://github.com/tyralla |
| tyralla | https://github.com/tyralla |
| Jun 20, 2025 | https://github.com/python/mypy/pull/19270#issuecomment-2990035273 |
| Please reload this page | https://github.com/python/mypy/pull/19270 |
| @JukkaL | https://github.com/JukkaL |
| Please reload this page | https://github.com/python/mypy/pull/19270 |
| https://github.com/tyralla |
| tyralla | https://github.com/tyralla |
| JukkaL | https://github.com/JukkaL |
| June 20, 2025 07:02 | https://github.com/python/mypy/pull/19270#event-18240717423 |
| https://github.com/apps/github-actions |
| github-actions | https://github.com/apps/github-actions |
| Jun 20, 2025 | https://github.com/python/mypy/pull/19270#issuecomment-2990054920 |
| mypy_primer | https://github.com/hauntsaninja/mypy_primer |
| Please reload this page | https://github.com/python/mypy/pull/19270 |
| https://github.com/JukkaL |
| JukkaL | https://github.com/JukkaL |
|
Jun 20, 2025
| https://github.com/python/mypy/pull/19270#pullrequestreview-2946667492 |
|
View reviewed changes
| https://github.com/python/mypy/pull/19270/files/af8b672ab2a89630be56c1494bea0877cad7c507 |
| https://github.com/JukkaL |
| JukkaL | https://github.com/JukkaL |
| 4322d4f | https://github.com/python/mypy/commit/4322d4f443ef7568b1c0f4fec8df9e12e90fd8b9 |
| Jun 20, 2025 | https://github.com/python/mypy/pull/19270#event-18250149064 |
| Please reload this page | https://github.com/python/mypy/pull/19270 |
| https://github.com/tyralla |
| tyralla | https://github.com/tyralla |
|
Jun 21, 2025
| https://github.com/python/mypy/pull/19270#ref-pullrequest-3165455942 |
|
Combine the revealed types of multiple iteration steps in a more robust manner.
#19324
| https://github.com/python/mypy/pull/19324 |
| JukkaL | https://github.com/JukkaL |
|
Jul 7, 2025
| https://github.com/python/mypy/pull/19270#ref-commit-1fde143 |
|
| https://github.com/tyralla |
| Combine the revealed types of multiple iteration steps in a more robu… | https://github.com/python/mypy/commit/1fde1438f6c47963ecd6e10a8c410ac41ba05103 |
| 1fde143 | https://github.com/python/mypy/commit/1fde1438f6c47963ecd6e10a8c410ac41ba05103 |
| #19324 | https://github.com/python/mypy/pull/19324 |
| #19118 | https://github.com/python/mypy/pull/19118 |
| #19270 | https://github.com/python/mypy/pull/19270 |
| @JukkaL | https://github.com/JukkaL |
| esarp | https://github.com/esarp |
|
Jul 10, 2025
| https://github.com/python/mypy/pull/19270#ref-commit-ab4fd57 |
|
| https://github.com/tyralla |
|
| https://github.com/esarp |
| Improve the handling of "iteration dependent" errors and notes in fin… | https://github.com/python/mypy/commit/ab4fd57d45b7f81cf281b17b7d3697ac9f79bc15 |
| ab4fd57 | https://github.com/python/mypy/commit/ab4fd57d45b7f81cf281b17b7d3697ac9f79bc15 |
| #19270 | https://github.com/python/mypy/pull/19270 |
| #19269 | https://github.com/python/mypy/issues/19269 |
| #19118 | https://github.com/python/mypy/pull/19118 |
| esarp | https://github.com/esarp |
|
Jul 10, 2025
| https://github.com/python/mypy/pull/19270#ref-commit-a182dec |
|
| https://github.com/tyralla |
|
| https://github.com/esarp |
| Combine the revealed types of multiple iteration steps in a more robu… | https://github.com/python/mypy/commit/a182dec997b418b925fe0c28575c50debba0bb3a |
| a182dec | https://github.com/python/mypy/commit/a182dec997b418b925fe0c28575c50debba0bb3a |
| #19324 | https://github.com/python/mypy/pull/19324 |
| #19118 | https://github.com/python/mypy/pull/19118 |
| #19270 | https://github.com/python/mypy/pull/19270 |
| @JukkaL | https://github.com/JukkaL |
| https://github.com/tyralla |
| tyralla | https://github.com/tyralla |
|
Jul 20, 2025
| https://github.com/python/mypy/pull/19270#ref-issue-1301083227 |
|
False positive statement is unreachable in try-finally related to KeyboardInterrupt
#13104
| https://github.com/python/mypy/issues/13104 |
| https://github.co/hiddenchars |
| https://github.com/python/mypy/pull/{{ revealButtonHref }} |
| Sign up for free | https://github.com/join?source=comment-repo |
| Sign in to comment | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F19270 |
|
| https://github.com/JukkaL |
|
JukkaL
| https://github.com/JukkaL |
|
| https://github.com/python/mypy/pull/19270/files/af8b672ab2a89630be56c1494bea0877cad7c507 |
|
| https://github.com/A5rocks |
|
A5rocks
| https://github.com/A5rocks |
|
Wrong unreachable note in finally section
| https://github.com/python/mypy/issues/19269 |
| Please reload this page | https://github.com/python/mypy/pull/19270 |
|
| https://github.com/tyralla |
|
| https://github.com/JukkaL |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |