| 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:a0b5b079-7bbc-06b7-bf91-117c7c6bfd41 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D90E:1386D9:914640:D0FB31:6A58C7D0 |
| html-safe-nonce | 52020be423555eaa597e8a3de2cebb42f1a9ee463ce4798950e9e9c034d10b13 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTBFOjEzODZEOTo5MTQ2NDA6RDBGQjMxOjZBNThDN0QwIiwidmlzaXRvcl9pZCI6IjMzMjE5MDIwODQxODI4MjA4MTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 285ee290b860a613cec6c59cc972370480d0d6b4825d5543f09fa338837fbc6f |
| hovercard-subject-tag | pull_request:3136373418 |
| 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/20492/pull_request_layout |
| twitter:image | https://opengraph.githubassets.com/020c7facdb9d529b527efe4c2341d0e363e7e39736e8a20e06e507bcecfcb940/python/mypy/pull/20492 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/020c7facdb9d529b527efe4c2341d0e363e7e39736e8a20e06e507bcecfcb940/python/mypy/pull/20492 |
| og:image:alt | Mypy does not narrow as much as it could, which results in false positives.
We would also like to narrow based on containment. The PR for that was previously reverted due to inconsistencies between... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hauntsaninja |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6 |
| 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 | 8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/mypy/pull/20492#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492 |
| 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%2F20492 |
|
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/20492 |
| Reload | https://github.com/python/mypy/pull/20492 |
| Reload | https://github.com/python/mypy/pull/20492 |
| Please reload this page | https://github.com/python/mypy/pull/20492 |
|
python
| https://github.com/python |
| mypy | https://github.com/python/mypy |
| Please reload this page | https://github.com/python/mypy/pull/20492 |
|
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 |
| hauntsaninja | https://github.com/hauntsaninja |
| python:master | https://github.com/python/mypy/tree/master |
| hauntsaninja:narrowcontain | https://github.com/hauntsaninja/mypy/tree/narrowcontain |
| Conversation | https://github.com/python/mypy/pull/20492 |
| Commits14 (14) | https://github.com/python/mypy/pull/20492/commits |
| Checks | https://github.com/python/mypy/pull/20492/checks |
| Files changed | https://github.com/python/mypy/pull/20492/files |
| Rework narrowing logic for equality and identity | https://github.com/python/mypy/pull/20492#top |
| hauntsaninja | https://github.com/hauntsaninja |
| python:master | https://github.com/python/mypy/tree/master |
| hauntsaninja:narrowcontain | https://github.com/hauntsaninja/mypy/tree/narrowcontain |
|
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
| Dec 30, 2025 | https://github.com/python/mypy/pull/20492#issue-3769650923 |
| Please reload this page | https://github.com/python/mypy/pull/20492 |
| #17864 | https://github.com/python/mypy/issues/17864 |
| #17841 | https://github.com/python/mypy/issues/17841 |
| #18524 | https://github.com/python/mypy/issues/18524 |
| #20041 | https://github.com/python/mypy/issues/20041 |
| #17162 | https://github.com/python/mypy/issues/17162 |
| #16830 | https://github.com/python/mypy/issues/16830 |
| #13704 | https://github.com/python/mypy/issues/13704 |
| #7642 | https://github.com/python/mypy/issues/7642 |
| #3964 | https://github.com/python/mypy/issues/3964 |
| Please reload this page | https://github.com/python/mypy/pull/20492 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
| force-pushed | https://github.com/python/mypy/compare/6e89ffd9a9e8e210b292dea8810fe1857c30319f..9e351d17b1c0685a142e090f60d9cd819245c081 |
| 6e89ffd | https://github.com/python/mypy/commit/6e89ffd9a9e8e210b292dea8810fe1857c30319f |
| 9e351d1 | https://github.com/python/mypy/commit/9e351d17b1c0685a142e090f60d9cd819245c081 |
|
Compare
| https://github.com/python/mypy/compare/6e89ffd9a9e8e210b292dea8810fe1857c30319f..9e351d17b1c0685a142e090f60d9cd819245c081 |
| December 30, 2025 10:38 | https://github.com/python/mypy/pull/20492#event-21791625143 |
|
| https://github.com/hauntsaninja |
| correct tests | https://github.com/python/mypy/pull/20492/commits/28fefe61bd6596314d6a5df96a00484257370e22 |
| 28fefe6 | https://github.com/python/mypy/pull/20492/commits/28fefe61bd6596314d6a5df96a00484257370e22 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492 |
| hauntsaninja | https://github.com/hauntsaninja |
| December 30, 2025 03:18 | https://github.com/python/mypy/pull/20492#commits-pushed-cce6a71 |
|
| https://github.com/hauntsaninja |
| wip | https://github.com/python/mypy/pull/20492/commits/cce6a713cc3daf9b5965e9ab973cffb1301cf089 |
| cce6a71 | https://github.com/python/mypy/pull/20492/commits/cce6a713cc3daf9b5965e9ab973cffb1301cf089 |
|
| https://github.com/hauntsaninja |
| incorrect tests | https://github.com/python/mypy/pull/20492/commits/cdbd7376612f68e715c5643674c5d6b972e57690 |
| cdbd737 | https://github.com/python/mypy/pull/20492/commits/cdbd7376612f68e715c5643674c5d6b972e57690 |
|
| https://github.com/hauntsaninja |
| comment | https://github.com/python/mypy/pull/20492/commits/4dbd1070851daf4a4c8265a5b50cf2e4936f819d |
| 4dbd107 | https://github.com/python/mypy/pull/20492/commits/4dbd1070851daf4a4c8265a5b50cf2e4936f819d |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
| force-pushed | https://github.com/python/mypy/compare/b29984a3f22cc9dbc33025dd7ef7972ec502347a..4dbd1070851daf4a4c8265a5b50cf2e4936f819d |
| b29984a | https://github.com/python/mypy/commit/b29984a3f22cc9dbc33025dd7ef7972ec502347a |
| 4dbd107 | https://github.com/python/mypy/commit/4dbd1070851daf4a4c8265a5b50cf2e4936f819d |
|
Compare
| https://github.com/python/mypy/compare/b29984a3f22cc9dbc33025dd7ef7972ec502347a..4dbd1070851daf4a4c8265a5b50cf2e4936f819d |
| December 30, 2025 11:20 | https://github.com/python/mypy/pull/20492#event-21792161462 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492 |
|
| https://github.com/hauntsaninja |
| avoid narrowing builtins | https://github.com/python/mypy/pull/20492/commits/4a552d58db0a99345bf3790e06093b3838f4c77a |
| 4a552d5 | https://github.com/python/mypy/pull/20492/commits/4a552d58db0a99345bf3790e06093b3838f4c77a |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
| force-pushed | https://github.com/python/mypy/compare/f574fefc5f10210de23c85772300678f6edb8d1e..4a552d58db0a99345bf3790e06093b3838f4c77a |
| f574fef | https://github.com/python/mypy/commit/f574fefc5f10210de23c85772300678f6edb8d1e |
| 4a552d5 | https://github.com/python/mypy/commit/4a552d58db0a99345bf3790e06093b3838f4c77a |
|
Compare
| https://github.com/python/mypy/compare/f574fefc5f10210de23c85772300678f6edb8d1e..4a552d58db0a99345bf3790e06093b3838f4c77a |
| December 30, 2025 21:21 | https://github.com/python/mypy/pull/20492#event-21800188744 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492 |
|
| https://github.com/hauntsaninja |
| more changes | https://github.com/python/mypy/pull/20492/commits/ca5120dac41891349b34a4e47e85ab0468518884 |
| ca5120d | https://github.com/python/mypy/pull/20492/commits/ca5120dac41891349b34a4e47e85ab0468518884 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
| force-pushed | https://github.com/python/mypy/compare/d143ddc1e7b453a9e802667876d9f9665b8b22ec..ca5120dac41891349b34a4e47e85ab0468518884 |
| d143ddc | https://github.com/python/mypy/commit/d143ddc1e7b453a9e802667876d9f9665b8b22ec |
| ca5120d | https://github.com/python/mypy/commit/ca5120dac41891349b34a4e47e85ab0468518884 |
|
Compare
| https://github.com/python/mypy/compare/d143ddc1e7b453a9e802667876d9f9665b8b22ec..ca5120dac41891349b34a4e47e85ab0468518884 |
| December 30, 2025 21:58 | https://github.com/python/mypy/pull/20492#event-21800545548 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492 |
| hauntsaninja | https://github.com/hauntsaninja |
| December 30, 2025 14:19 | https://github.com/python/mypy/pull/20492#commits-pushed-94c5be7 |
|
| https://github.com/hauntsaninja |
| improve test | https://github.com/python/mypy/pull/20492/commits/94c5be7cfc6b62932d4c19f586fd665696101808 |
| 94c5be7 | https://github.com/python/mypy/pull/20492/commits/94c5be7cfc6b62932d4c19f586fd665696101808 |
|
| https://github.com/hauntsaninja |
| new test | https://github.com/python/mypy/pull/20492/commits/92051d994189a8a4f3eae6ad256610b6ab90857f |
| 92051d9 | https://github.com/python/mypy/pull/20492/commits/92051d994189a8a4f3eae6ad256610b6ab90857f |
|
| https://github.com/hauntsaninja |
| fix | https://github.com/python/mypy/pull/20492/commits/586d2a1b01051bafbccfd6ef5b00a99191806ac5 |
| 586d2a1 | https://github.com/python/mypy/pull/20492/commits/586d2a1b01051bafbccfd6ef5b00a99191806ac5 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
| force-pushed | https://github.com/python/mypy/compare/bdfc626e43b46378de8248c25a732283bff49f7d..586d2a1b01051bafbccfd6ef5b00a99191806ac5 |
| bdfc626 | https://github.com/python/mypy/commit/bdfc626e43b46378de8248c25a732283bff49f7d |
| 586d2a1 | https://github.com/python/mypy/commit/586d2a1b01051bafbccfd6ef5b00a99191806ac5 |
|
Compare
| https://github.com/python/mypy/compare/bdfc626e43b46378de8248c25a732283bff49f7d..586d2a1b01051bafbccfd6ef5b00a99191806ac5 |
| December 30, 2025 22:42 | https://github.com/python/mypy/pull/20492#event-21801005323 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492 |
| https://github.com/apps/github-actions |
| github-actions | https://github.com/apps/github-actions |
|
Dec 30, 2025
| https://github.com/python/mypy/pull/20492#ref-issue-3771505652 |
|
Check #20492
sterliakov/mypy-issues#237
| https://github.com/sterliakov/mypy-issues/issues/237 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492 |
|
| https://github.com/hauntsaninja |
| clean up | https://github.com/python/mypy/pull/20492/commits/7bc5dacc75ccba24f038cd0031dd2abd28b86bff |
| 7bc5dac | https://github.com/python/mypy/pull/20492/commits/7bc5dacc75ccba24f038cd0031dd2abd28b86bff |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
| force-pushed | https://github.com/python/mypy/compare/0b15de0d34cfcd4dbf003639ba165e1b361bf90a..7bc5dacc75ccba24f038cd0031dd2abd28b86bff |
| 0b15de0 | https://github.com/python/mypy/commit/0b15de0d34cfcd4dbf003639ba165e1b361bf90a |
| 7bc5dac | https://github.com/python/mypy/commit/7bc5dacc75ccba24f038cd0031dd2abd28b86bff |
|
Compare
| https://github.com/python/mypy/compare/0b15de0d34cfcd4dbf003639ba165e1b361bf90a..7bc5dacc75ccba24f038cd0031dd2abd28b86bff |
| December 30, 2025 23:25 | https://github.com/python/mypy/pull/20492#event-21801503806 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492 |
|
| https://github.com/hauntsaninja |
| setattr | https://github.com/python/mypy/pull/20492/commits/1ef7ab710deafd51edfdf1f2d76fb881cb9e498b |
| 1ef7ab7 | https://github.com/python/mypy/pull/20492/commits/1ef7ab710deafd51edfdf1f2d76fb881cb9e498b |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492 |
| hauntsaninja | https://github.com/hauntsaninja |
| December 30, 2025 19:02 | https://github.com/python/mypy/pull/20492#commits-pushed-5cc76be |
|
| https://github.com/hauntsaninja |
| improve | https://github.com/python/mypy/pull/20492/commits/5cc76be1cc64480d74033b9357e92559c212a907 |
| 5cc76be | https://github.com/python/mypy/pull/20492/commits/5cc76be1cc64480d74033b9357e92559c212a907 |
|
| https://github.com/hauntsaninja |
| . | https://github.com/python/mypy/pull/20492/commits/54b4c8ed8f53e66679c18bfb311cf65372cc6ab4 |
| 54b4c8e | https://github.com/python/mypy/pull/20492/commits/54b4c8ed8f53e66679c18bfb311cf65372cc6ab4 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 16, 2026
| https://github.com/python/mypy/pull/20492#ref-pullrequest-3823640304 |
|
Add some additional narrowing test cases
#20598
| https://github.com/python/mypy/pull/20598 |
| https://github.com/George-Ogden |
| George-Ogden | https://github.com/George-Ogden |
|
Jan 16, 2026
| https://github.com/python/mypy/pull/20492#ref-issue-3823693450 |
|
Regression with Narrowing (Test Cases)
#20600
| https://github.com/python/mypy/issues/20600 |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 16, 2026
| https://github.com/python/mypy/pull/20492#ref-commit-66f83ea |
|
| https://github.com/hauntsaninja |
| Refactor equality and identity narrowing for clarity ( | https://github.com/python/mypy/commit/66f83ea328e40058d6f4e7e707672c2aa51fff31 |
| #20595 | https://github.com/python/mypy/pull/20595 |
| ) | https://github.com/python/mypy/commit/66f83ea328e40058d6f4e7e707672c2aa51fff31 |
| 66f83ea | https://github.com/python/mypy/commit/66f83ea328e40058d6f4e7e707672c2aa51fff31 |
| #20492 | https://github.com/python/mypy/pull/20492 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 16, 2026
| https://github.com/python/mypy/pull/20492#ref-pullrequest-3823772196 |
|
Narrow types based on collection containment
#20602
| https://github.com/python/mypy/pull/20602 |
| https://github.com/George-Ogden |
| George-Ogden | https://github.com/George-Ogden |
|
Jan 16, 2026
| https://github.com/python/mypy/pull/20492#ref-pullrequest-3823780479 |
|
Add more test cases for type narrowing
#20603
| https://github.com/python/mypy/pull/20603 |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 16, 2026
| https://github.com/python/mypy/pull/20492#ref-commit-c72d4f1 |
|
| https://github.com/hauntsaninja |
| Add some additional narrowing test cases ( | https://github.com/python/mypy/commit/c72d4f1dee65dce69a78345c77632da95b613bb6 |
| #20598 | https://github.com/python/mypy/pull/20598 |
| ) | https://github.com/python/mypy/commit/c72d4f1dee65dce69a78345c77632da95b613bb6 |
| c72d4f1 | https://github.com/python/mypy/commit/c72d4f1dee65dce69a78345c77632da95b613bb6 |
| #20492 (comment) | https://github.com/python/mypy/pull/20492#discussion_r2699572287 |
| #18524 (comment) | https://github.com/python/mypy/issues/18524#issuecomment-2613070787 |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 17, 2026
| https://github.com/python/mypy/pull/20492#ref-commit-e395104 |
|
| https://github.com/hauntsaninja |
| Avoid narrowing TypeType | https://github.com/hauntsaninja/mypy/commit/e395104c90f3d8b68645dc782aa439c5ba4d865c |
| e395104 | https://github.com/hauntsaninja/mypy/commit/e395104c90f3d8b68645dc782aa439c5ba4d865c |
| python#20492 | https://github.com/python/mypy/pull/20492 |
| https://github.com/A5rocks |
| A5rocks | https://github.com/A5rocks |
|
Jan 17, 2026
| https://github.com/python/mypy/pull/20492#ref-pullrequest-3824561334 |
|
Mark more things as literals
#20604
| https://github.com/python/mypy/pull/20604 |
| https://github.com/cdce8p |
| cdce8p | https://github.com/cdce8p |
| Jan 17, 2026 | https://github.com/python/mypy/pull/20492#issuecomment-3763233475 |
| Please reload this page | https://github.com/python/mypy/pull/20492 |
| Please reload this page | https://github.com/python/mypy/pull/20492 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
| Jan 17, 2026 | https://github.com/python/mypy/pull/20492#issuecomment-3764298502 |
| Please reload this page | https://github.com/python/mypy/pull/20492 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 17, 2026
| https://github.com/python/mypy/pull/20492#ref-pullrequest-3825797573 |
|
Improve narrowing logic for Enum int and str subclasses
#20609
| https://github.com/python/mypy/pull/20609 |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 21, 2026
| https://github.com/python/mypy/pull/20492#ref-commit-fb0845d |
|
| https://github.com/hauntsaninja |
| Improve narrowing logic for Enum int and str subclasses ( | https://github.com/python/mypy/commit/fb0845d66f10ec220e7ec69be98a2671527884d9 |
| #20609 | https://github.com/python/mypy/pull/20609 |
| ) | https://github.com/python/mypy/commit/fb0845d66f10ec220e7ec69be98a2671527884d9 |
| fb0845d | https://github.com/python/mypy/commit/fb0845d66f10ec220e7ec69be98a2671527884d9 |
| #20492 | https://github.com/python/mypy/pull/20492 |
| #19753 | https://github.com/python/mypy/issues/19753 |
| #20492 (comment) | https://github.com/python/mypy/pull/20492#issuecomment-3763233475 |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 21, 2026
| https://github.com/python/mypy/pull/20492#ref-commit-903fae1 |
|
| https://github.com/hauntsaninja |
| Avoid narrowing TypeType | https://github.com/hauntsaninja/mypy/commit/903fae15bd8e0ee138d9e0e5bdd85c9984e7e570 |
| 903fae1 | https://github.com/hauntsaninja/mypy/commit/903fae15bd8e0ee138d9e0e5bdd85c9984e7e570 |
| python#20492 | https://github.com/python/mypy/pull/20492 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 22, 2026
| https://github.com/python/mypy/pull/20492#ref-issue-3840788894 |
|
Regression with narrowing with TypeVar intersection
#20628
| https://github.com/python/mypy/issues/20628 |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 22, 2026
| https://github.com/python/mypy/pull/20492#ref-commit-b91f53c |
|
| https://github.com/hauntsaninja |
| Narrow types based on collection containment ( | https://github.com/python/mypy/commit/b91f53c1b2d4cd12bf4e15781e447ebdd72f2b42 |
| #20602 | https://github.com/python/mypy/pull/20602 |
| ) | https://github.com/python/mypy/commit/b91f53c1b2d4cd12bf4e15781e447ebdd72f2b42 |
| b91f53c | https://github.com/python/mypy/commit/b91f53c1b2d4cd12bf4e15781e447ebdd72f2b42 |
| #17841 | https://github.com/python/mypy/issues/17841 |
| #17864 | https://github.com/python/mypy/issues/17864 |
| #17869 | https://github.com/python/mypy/pull/17869 |
| #20492 | https://github.com/python/mypy/pull/20492 |
| #3229 | https://github.com/python/mypy/issues/3229 |
| #20234 | https://github.com/python/mypy/issues/20234 |
| #18208 | https://github.com/python/mypy/issues/18208 |
| #16774 | https://github.com/python/mypy/issues/16774 |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 22, 2026
| https://github.com/python/mypy/pull/20492#ref-commit-46f4669 |
|
| https://github.com/hauntsaninja |
| Avoid narrowing TypeType | https://github.com/hauntsaninja/mypy/commit/46f4669c31582146a4aa8333b1e92e2906532c41 |
| 46f4669 | https://github.com/hauntsaninja/mypy/commit/46f4669c31582146a4aa8333b1e92e2906532c41 |
| python#20492 | https://github.com/python/mypy/pull/20492 |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 22, 2026
| https://github.com/python/mypy/pull/20492#ref-commit-f342be8 |
|
| https://github.com/hauntsaninja |
| [testing] Avoid narrowing TypeType | https://github.com/hauntsaninja/mypy/commit/f342be80c10981440297139ccb40521aaa25d801 |
| f342be8 | https://github.com/hauntsaninja/mypy/commit/f342be80c10981440297139ccb40521aaa25d801 |
| python#20492 | https://github.com/python/mypy/pull/20492 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 22, 2026
| https://github.com/python/mypy/pull/20492#ref-pullrequest-3845161724 |
|
[do not review] Avoid narrowing TypeType
#20636
| https://github.com/python/mypy/pull/20636 |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 22, 2026
| https://github.com/python/mypy/pull/20492#ref-commit-06d18ce |
|
| https://github.com/hauntsaninja |
| Avoid narrowing TypeType | https://github.com/hauntsaninja/mypy/commit/06d18ce73d3169eb2acb2533da639cd76706c5a8 |
| 06d18ce | https://github.com/hauntsaninja/mypy/commit/06d18ce73d3169eb2acb2533da639cd76706c5a8 |
| python#20492 | https://github.com/python/mypy/pull/20492 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 23, 2026
| https://github.com/python/mypy/pull/20492#ref-pullrequest-3848860392 |
|
Better narrowing with custom equality
#20643
| https://github.com/python/mypy/pull/20643 |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 27, 2026
| https://github.com/python/mypy/pull/20492#ref-commit-e64a84b |
|
| https://github.com/hauntsaninja |
| Better narrowing with custom equality ( | https://github.com/python/mypy/commit/e64a84b118bb338ec6efd428d398e6ebd5b79bfc |
| #20643 | https://github.com/python/mypy/pull/20643 |
| ) | https://github.com/python/mypy/commit/e64a84b118bb338ec6efd428d398e6ebd5b79bfc |
| e64a84b | https://github.com/python/mypy/commit/e64a84b118bb338ec6efd428d398e6ebd5b79bfc |
| #20492 (comment) | https://github.com/python/mypy/pull/20492#discussion_r2678846727 |
| #20532 | https://github.com/python/mypy/issues/20532 |
| #18029 | https://github.com/python/mypy/issues/18029 |
| #17229 | https://github.com/python/mypy/issues/17229 |
| #16465 | https://github.com/python/mypy/issues/16465 |
| #18574 | https://github.com/python/mypy/pull/18574 |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 28, 2026
| https://github.com/python/mypy/pull/20492#ref-commit-2502e17 |
|
| https://github.com/hauntsaninja |
| Avoid narrowing type[T] | https://github.com/hauntsaninja/mypy/commit/2502e17f453147395ea3cc94149b99343c6b0535 |
| 2502e17 | https://github.com/hauntsaninja/mypy/commit/2502e17f453147395ea3cc94149b99343c6b0535 |
| python#20492 | https://github.com/python/mypy/pull/20492 |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 28, 2026
| https://github.com/python/mypy/pull/20492#ref-commit-2ecb997 |
|
| https://github.com/hauntsaninja |
| Avoid narrowing type[T] | https://github.com/hauntsaninja/mypy/commit/2ecb997a2482548284ab02ee40a353df24220cd6 |
| 2ecb997 | https://github.com/hauntsaninja/mypy/commit/2ecb997a2482548284ab02ee40a353df24220cd6 |
| python#20492 | https://github.com/python/mypy/pull/20492 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 28, 2026
| https://github.com/python/mypy/pull/20492#ref-pullrequest-3863661663 |
|
Avoid narrowing type[T]
#20662
| https://github.com/python/mypy/pull/20662 |
| hauntsaninja | https://github.com/hauntsaninja |
|
Jan 28, 2026
| https://github.com/python/mypy/pull/20492#ref-commit-92a1256 |
|
| https://github.com/hauntsaninja |
| Avoid narrowing type[T] | https://github.com/hauntsaninja/mypy/commit/92a12565a4326e6df77787050583c756df81f8ea |
| 92a1256 | https://github.com/hauntsaninja/mypy/commit/92a12565a4326e6df77787050583c756df81f8ea |
| python#20492 | https://github.com/python/mypy/pull/20492 |
| JukkaL | https://github.com/JukkaL |
|
Jan 28, 2026
| https://github.com/python/mypy/pull/20492#ref-commit-edc47c6 |
|
| https://github.com/hauntsaninja |
| Avoid narrowing type[T] ( | https://github.com/python/mypy/commit/edc47c6bbc59348ef8ae5ba97673397edbf09f4c |
| #20662 | https://github.com/python/mypy/pull/20662 |
| ) | https://github.com/python/mypy/commit/edc47c6bbc59348ef8ae5ba97673397edbf09f4c |
| edc47c6 | https://github.com/python/mypy/commit/edc47c6bbc59348ef8ae5ba97673397edbf09f4c |
| #20492 | https://github.com/python/mypy/pull/20492 |
| #20636 | https://github.com/python/mypy/pull/20636 |
|
Optional bytes type not narrowed after asserting equality
#20701
| https://github.com/python/mypy/issues/20701 |
|
Short term fix for bytes narrowing
#20704
| https://github.com/python/mypy/pull/20704 |
| JukkaL | https://github.com/JukkaL |
|
Feb 2, 2026
| https://github.com/python/mypy/pull/20492#ref-commit-ec4c463 |
|
| https://github.com/hauntsaninja |
| Short term fix for bytes narrowing ( | https://github.com/python/mypy/commit/ec4c463861fd8683f85fa0c34929e8fca499530f |
| #20704 | https://github.com/python/mypy/pull/20704 |
| ) | https://github.com/python/mypy/commit/ec4c463861fd8683f85fa0c34929e8fca499530f |
| ec4c463 | https://github.com/python/mypy/commit/ec4c463861fd8683f85fa0c34929e8fca499530f |
| #20701 | https://github.com/python/mypy/issues/20701 |
| #20492 | https://github.com/python/mypy/pull/20492 |
| #20643 | https://github.com/python/mypy/pull/20643 |
| #20673 | https://github.com/python/mypy/pull/20673 |
| #20492 | https://github.com/python/mypy/pull/20492 |
| #20660 | https://github.com/python/mypy/pull/20660 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
|
Feb 8, 2026
| https://github.com/python/mypy/pull/20492#ref-pullrequest-3911624710 |
|
Avoid narrowing to NewType
#20766
| https://github.com/python/mypy/pull/20766 |
| 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%2F20492 |
|
| https://github.com/JukkaL |
|
JukkaL
| https://github.com/JukkaL |
|
| https://github.com/python/mypy/pull/20492/files/ce2728eb7acfbe6c3a4bb7f74eac12cb7d6f64f2 |
|
| https://github.com/ilevkivskyi |
|
ilevkivskyi
| https://github.com/ilevkivskyi |
|
| https://github.com/A5rocks |
|
A5rocks
| https://github.com/A5rocks |
|
| https://github.com/python/mypy/pull/20492/files/ce2728eb7acfbe6c3a4bb7f74eac12cb7d6f64f2 |
|
False-positive typecheck with StrEnum
| https://github.com/python/mypy/issues/17162 |
|
Enum member aliases are treated as never-equal
| https://github.com/python/mypy/issues/16830 |
|
cls (which is str) has revealed type of "Type[builtins.object]"
| https://github.com/python/mypy/issues/13704 |
|
FR: Type narrowing for x is C
| https://github.com/python/mypy/issues/7642 |
|
Infer type in conditional block after (un-)successful == comparison
| https://github.com/python/mypy/issues/3964 |
|
"Statement is unreachable" when doing match on type objects
| https://github.com/python/mypy/issues/18524 |
|
Use type(var) is T to Narrow Types
| https://github.com/python/mypy/issues/20041 |
| Please reload this page | https://github.com/python/mypy/pull/20492 |
|
| https://github.com/hauntsaninja |
|
| https://github.com/cdce8p |
|
| https://github.com/JukkaL |
|
| https://github.com/A5rocks |
|
| https://github.com/raihanahad |
|
| 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 |