| 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:bae397e4-5757-3374-e05b-f81fa93426f5 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B1A4:3847EE:6370D9:8F4270:6A578000 |
| html-safe-nonce | 3cb149bc1c035ac2d941a65e20649458135e9628edd6ed192b9910fa182d9d1e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUE0OjM4NDdFRTo2MzcwRDk6OEY0MjcwOjZBNTc4MDAwIiwidmlzaXRvcl9pZCI6IjE2NTc3NzYzOTY0MzE3NTMyMTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7e6d66f8d37ec38f8b953ed1d56aca2aeaf9de0863c1ff85e4f2ca0a9896c792 |
| hovercard-subject-tag | pull_request:2719460978 |
| 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/19594/pull_request_layout |
| twitter:image | https://opengraph.githubassets.com/ad9f55a10e17d8035bab0d3ae375c5411ca8731e2b4f2e5974a0d0d362965af0/python/mypy/pull/19594 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ad9f55a10e17d8035bab0d3ae375c5411ca8731e2b4f2e5974a0d0d362965af0/python/mypy/pull/19594 |
| og:image:alt | Fixes #19576.
Fixes #16327.
Fixes #17162.
Fixes #19753.
This needs more feedback: is the logic I propose reasonable? Do we want to be stricter and reject such comparisons altogether? Or maybe only ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sterliakov |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6353e56e94423c9cd5abde7708a859afa36a0c1203c73749055bf6ee6704cd0 |
| 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 | 9a9dfe2eff5c790a030f34cfcc89b4bf3ba08c7c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/mypy/pull/19594#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F19594 |
| 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%2F19594 |
|
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/19594 |
| Reload | https://github.com/python/mypy/pull/19594 |
| Reload | https://github.com/python/mypy/pull/19594 |
| Please reload this page | https://github.com/python/mypy/pull/19594 |
|
python
| https://github.com/python |
| mypy | https://github.com/python/mypy |
| Please reload this page | https://github.com/python/mypy/pull/19594 |
|
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
463
| 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 |
| sterliakov | https://github.com/sterliakov |
| python:master | https://github.com/python/mypy/tree/master |
| sterliakov:bugfix/gh-19576-enum-comparison-overlap | https://github.com/sterliakov/mypy/tree/bugfix/gh-19576-enum-comparison-overlap |
| Conversation | https://github.com/python/mypy/pull/19594 |
| Commits13 (13) | https://github.com/python/mypy/pull/19594/commits |
| Checks | https://github.com/python/mypy/pull/19594/checks |
| Files changed | https://github.com/python/mypy/pull/19594/files |
| Better support for SomeEnum.item == some_literal | https://github.com/python/mypy/pull/19594#top |
| sterliakov | https://github.com/sterliakov |
| python:master | https://github.com/python/mypy/tree/master |
| sterliakov:bugfix/gh-19576-enum-comparison-overlap | https://github.com/sterliakov/mypy/tree/bugfix/gh-19576-enum-comparison-overlap |
|
| https://github.com/sterliakov |
| sterliakov | https://github.com/sterliakov |
| Aug 4, 2025 | https://github.com/python/mypy/pull/19594#issue-3291097255 |
| Please reload this page | https://github.com/python/mypy/pull/19594 |
| #19576 | https://github.com/python/mypy/issues/19576 |
| #16327 | https://github.com/python/mypy/issues/16327 |
| #17162 | https://github.com/python/mypy/issues/17162 |
| #19753 | https://github.com/python/mypy/issues/19753 |
| Please reload this page | https://github.com/python/mypy/pull/19594 |
|
| https://github.com/sterliakov |
| Fix enum comparison with literal values | https://github.com/python/mypy/pull/19594/commits/ab3ed33b65f53786d214be34d147a60edaf1b887 |
| ab3ed33 | https://github.com/python/mypy/pull/19594/commits/ab3ed33b65f53786d214be34d147a60edaf1b887 |
| https://github.com/apps/github-actions |
| github-actions | https://github.com/apps/github-actions |
|
Aug 5, 2025
| https://github.com/python/mypy/pull/19594#ref-issue-3291106281 |
|
Check #19594
sterliakov/mypy-issues#130
| https://github.com/sterliakov/mypy-issues/issues/130 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F19594 |
| https://github.com/A5rocks |
| A5rocks | https://github.com/A5rocks |
|
Aug 5, 2025
| https://github.com/python/mypy/pull/19594#pullrequestreview-3086133558 |
|
View reviewed changes
| https://github.com/python/mypy/pull/19594/files/ab3ed33b65f53786d214be34d147a60edaf1b887 |
| A5rocks | https://github.com/A5rocks |
| https://github.com/python/mypy/pull/19594#pullrequestreview-3086133558 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/mypy/pull/19594 |
| test-data/unit/check-enum.test | https://github.com/python/mypy/pull/19594/files/ab3ed33b65f53786d214be34d147a60edaf1b887#diff-ebc735ad8fa6eb42d5390fa4fa9ef60581764c7bbfb5eafcde16f5e40c330c84 |
| Please reload this page | https://github.com/python/mypy/pull/19594 |
| sterliakov | https://github.com/sterliakov |
| August 7, 2025 17:35 | https://github.com/python/mypy/pull/19594#commits-pushed-6f4dbb8 |
|
| https://github.com/sterliakov |
| Merge remote-tracking branch 'upstream/master' into bugfix/ | https://github.com/python/mypy/pull/19594/commits/6f4dbb8163a218b9f2d6eaa78aa379e302270819 |
| pythongh-1… | https://github.com/python/mypy/issues/19576 |
| 6f4dbb8 | https://github.com/python/mypy/pull/19594/commits/6f4dbb8163a218b9f2d6eaa78aa379e302270819 |
| …9576 | https://github.com/python/mypy/issues/19576 |
|
| https://github.com/sterliakov |
| Sync reachability and comparison overlap checks | https://github.com/python/mypy/pull/19594/commits/350aa53ed54d7dd3668b44487a18dff217016cf9 |
| 350aa53 | https://github.com/python/mypy/pull/19594/commits/350aa53ed54d7dd3668b44487a18dff217016cf9 |
|
| https://github.com/sterliakov |
| Fix selfcheck | https://github.com/python/mypy/pull/19594/commits/ebfc647bcbd243d191f71cfdef0cba6a1a73ce41 |
| ebfc647 | https://github.com/python/mypy/pull/19594/commits/ebfc647bcbd243d191f71cfdef0cba6a1a73ce41 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F19594 |
|
| https://github.com/sterliakov |
| Oops | https://github.com/python/mypy/pull/19594/commits/0001936504a9c65ba509156bd6b06b4024548f18 |
| 0001936 | https://github.com/python/mypy/pull/19594/commits/0001936504a9c65ba509156bd6b06b4024548f18 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F19594 |
|
| https://github.com/sterliakov |
| Prevent narrowing by equality to overlapping literals (discarding enu… | https://github.com/python/mypy/pull/19594/commits/c87c7074149944b7578f391f6bb3a2de270026fa |
| c87c707 | https://github.com/python/mypy/pull/19594/commits/c87c7074149944b7578f391f6bb3a2de270026fa |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F19594 |
| sterliakov | https://github.com/sterliakov |
| August 28, 2025 13:30 | https://github.com/python/mypy/pull/19594#commits-pushed-ba560f2 |
|
| https://github.com/sterliakov |
| No, that was too much | https://github.com/python/mypy/pull/19594/commits/ba560f23ed0379aad24a8718ea4c4d335782adec |
| ba560f2 | https://github.com/python/mypy/pull/19594/commits/ba560f23ed0379aad24a8718ea4c4d335782adec |
|
| https://github.com/sterliakov |
| Pick unreachable branches more aggressively | https://github.com/python/mypy/pull/19594/commits/d96243d4c96096fd8efcc994c43cbb63366bc079 |
| d96243d | https://github.com/python/mypy/pull/19594/commits/d96243d4c96096fd8efcc994c43cbb63366bc079 |
|
| https://github.com/sterliakov |
| Merge remote-tracking branch 'upstream/master' into bugfix/ | https://github.com/python/mypy/pull/19594/commits/6c4f0aa207266ca5d1bc9139dbf34cd1963ef201 |
| pythongh-1… | https://github.com/python/mypy/issues/19576 |
| 6c4f0aa | https://github.com/python/mypy/pull/19594/commits/6c4f0aa207266ca5d1bc9139dbf34cd1963ef201 |
| …9576 | https://github.com/python/mypy/issues/19576 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F19594 |
| https://github.com/sterliakov |
| sterliakov | https://github.com/sterliakov |
| August 28, 2025 13:51 | https://github.com/python/mypy/pull/19594#event-19392353675 |
| https://github.com/A5rocks |
| A5rocks | https://github.com/A5rocks |
|
Aug 28, 2025
| https://github.com/python/mypy/pull/19594#ref-issue-3363703612 |
|
Type narrowing an enum shouldn't narrow to a literal
#19753
| https://github.com/python/mypy/issues/19753 |
| https://github.com/A5rocks |
| A5rocks | https://github.com/A5rocks |
|
Aug 28, 2025
| https://github.com/python/mypy/pull/19594#pullrequestreview-3165331086 |
|
View reviewed changes
| https://github.com/python/mypy/pull/19594/files/6c4f0aa207266ca5d1bc9139dbf34cd1963ef201 |
| A5rocks | https://github.com/A5rocks |
| https://github.com/python/mypy/pull/19594#pullrequestreview-3165331086 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| #19753 | https://github.com/python/mypy/issues/19753 |
| Please reload this page | https://github.com/python/mypy/pull/19594 |
|
| https://github.com/sterliakov |
| Handle (str, Enum) and (int, Enum) subclasses narrowing | https://github.com/python/mypy/pull/19594/commits/79262e75facbec39b5c7c426ef20b54dce72bfa4 |
| 79262e7 | https://github.com/python/mypy/pull/19594/commits/79262e75facbec39b5c7c426ef20b54dce72bfa4 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F19594 |
|
| https://github.com/sterliakov |
| Merge branch 'master' into bugfix/ | https://github.com/python/mypy/pull/19594/commits/9fda66ecb0734feaf551ed2d6941a33715ee26c0 |
| pythongh-19576 | https://github.com/python/mypy/issues/19576 |
| -enum-comparison-overlap | https://github.com/python/mypy/pull/19594/commits/9fda66ecb0734feaf551ed2d6941a33715ee26c0 |
| 9fda66e | https://github.com/python/mypy/pull/19594/commits/9fda66ecb0734feaf551ed2d6941a33715ee26c0 |
| https://github.com/sterliakov |
| sterliakov | https://github.com/sterliakov |
|
topic-enum
| https://github.com/python/mypy/issues?q=state%3Aopen%20label%3Atopic-enum |
| Sep 16, 2025 | https://github.com/python/mypy/pull/19594#event-19723049732 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F19594 |
|
| https://github.com/sterliakov |
| Merge branch 'master' into bugfix/ | https://github.com/python/mypy/pull/19594/commits/b3713a27fd3ab9e2c3a78f3e7afdae8c9296143b |
| pythongh-19576 | https://github.com/python/mypy/issues/19576 |
| -enum-comparison-overlap | https://github.com/python/mypy/pull/19594/commits/b3713a27fd3ab9e2c3a78f3e7afdae8c9296143b |
| b3713a2 | https://github.com/python/mypy/pull/19594/commits/b3713a27fd3ab9e2c3a78f3e7afdae8c9296143b |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F19594 |
| https://github.com/sterliakov |
| sterliakov | https://github.com/sterliakov |
|
Oct 30, 2025
| https://github.com/python/mypy/pull/19594#ref-issue-3567511411 |
|
match-case does not work correctly with Literals vs Enums
#20142
| https://github.com/python/mypy/issues/20142 |
|
| https://github.com/sterliakov |
| Merge branch 'master' into bugfix/ | https://github.com/python/mypy/pull/19594/commits/00179434dfde0e60c6ea08f3f858cc0d64634af7 |
| pythongh-19576 | https://github.com/python/mypy/issues/19576 |
| -enum-comparison-overlap | https://github.com/python/mypy/pull/19594/commits/00179434dfde0e60c6ea08f3f858cc0d64634af7 |
| 0017943 | https://github.com/python/mypy/pull/19594/commits/00179434dfde0e60c6ea08f3f858cc0d64634af7 |
| https://github.com/apps/github-actions |
| github-actions | https://github.com/apps/github-actions |
| Oct 30, 2025 | https://github.com/python/mypy/pull/19594#issuecomment-3467866102 |
| mypy_primer | https://github.com/hauntsaninja/mypy_primer |
| Please reload this page | https://github.com/python/mypy/pull/19594 |
| https://github.com/sterliakov |
| sterliakov | https://github.com/sterliakov |
| Oct 30, 2025 | https://github.com/python/mypy/pull/19594#issuecomment-3467911574 |
| #20142 (comment) | https://github.com/python/mypy/issues/20142#issuecomment-3467833150 |
| Please reload this page | https://github.com/python/mypy/pull/19594 |
| https://github.com/sterliakov |
| sterliakov | https://github.com/sterliakov |
| October 30, 2025 13:09 | https://github.com/python/mypy/pull/19594#event-20608759151 |
| https://github.com/sterliakov |
| sterliakov | https://github.com/sterliakov |
|
Oct 30, 2025
| https://github.com/python/mypy/pull/19594#ref-pullrequest-3570997746 |
|
Do not treat match value patterns as isinstance checks
#20146
| https://github.com/python/mypy/pull/20146 |
| https://github.com/A5rocks |
| A5rocks | https://github.com/A5rocks |
| Feb 15, 2026 | https://github.com/python/mypy/pull/19594#issuecomment-3905459741 |
| Please reload this page | https://github.com/python/mypy/pull/19594 |
| 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%2F19594 |
|
| https://github.com/A5rocks |
|
A5rocks
| https://github.com/A5rocks |
|
| https://github.com/python/mypy/pull/19594/files/6c4f0aa207266ca5d1bc9139dbf34cd1963ef201 |
|
topic-enum
| https://github.com/python/mypy/issues?q=state%3Aopen%20label%3Atopic-enum |
|
comparison-overlap triggers for string enum members when the member name isn't the same as the comparison value
| https://github.com/python/mypy/issues/19576 |
|
IntEnum literals are not considerable comparable with ints
| https://github.com/python/mypy/issues/16327 |
|
Type narrowing an enum shouldn't narrow to a literal
| https://github.com/python/mypy/issues/19753 |
|
False-positive typecheck with StrEnum
| https://github.com/python/mypy/issues/17162 |
| Please reload this page | https://github.com/python/mypy/pull/19594 |
|
| https://github.com/sterliakov |
|
| https://github.com/A5rocks |
|
| 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 |