René's URL Explorer Experiment


Title: Rework narrowing logic for equality and identity by hauntsaninja · Pull Request #20492 · python/mypy · GitHub

Open Graph Title: Rework narrowing logic for equality and identity by hauntsaninja · Pull Request #20492 · python/mypy

X Title: Rework narrowing logic for equality and identity by hauntsaninja · Pull Request #20492 · python/mypy

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

Open Graph Description: 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...

X Description: 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...

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

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:a0b5b079-7bbc-06b7-bf91-117c7c6bfd41
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD90E:1386D9:914640:D0FB31:6A58C7D0
html-safe-nonce52020be423555eaa597e8a3de2cebb42f1a9ee463ce4798950e9e9c034d10b13
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTBFOjEzODZEOTo5MTQ2NDA6RDBGQjMxOjZBNThDN0QwIiwidmlzaXRvcl9pZCI6IjMzMjE5MDIwODQxODI4MjA4MTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac285ee290b860a613cec6c59cc972370480d0d6b4825d5543f09fa338837fbc6f
hovercard-subject-tagpull_request:3136373418
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/20492/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/020c7facdb9d529b527efe4c2341d0e363e7e39736e8a20e06e507bcecfcb940/python/mypy/pull/20492
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/020c7facdb9d529b527efe4c2341d0e363e7e39736e8a20e06e507bcecfcb940/python/mypy/pull/20492
og:image:altMypy 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:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehauntsaninja
hostnamegithub.com
expected-hostnamegithub.com
None5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6
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
release8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://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 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%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
Reloadhttps://github.com/python/mypy/pull/20492
Reloadhttps://github.com/python/mypy/pull/20492
Reloadhttps://github.com/python/mypy/pull/20492
Please reload this pagehttps://github.com/python/mypy/pull/20492
python https://github.com/python
mypyhttps://github.com/python/mypy
Please reload this pagehttps://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
hauntsaninjahttps://github.com/hauntsaninja
python:masterhttps://github.com/python/mypy/tree/master
hauntsaninja:narrowcontainhttps://github.com/hauntsaninja/mypy/tree/narrowcontain
Conversationhttps://github.com/python/mypy/pull/20492
Commits14 (14)https://github.com/python/mypy/pull/20492/commits
Checkshttps://github.com/python/mypy/pull/20492/checks
Files changedhttps://github.com/python/mypy/pull/20492/files
Rework narrowing logic for equality and identityhttps://github.com/python/mypy/pull/20492#top
hauntsaninjahttps://github.com/hauntsaninja
python:masterhttps://github.com/python/mypy/tree/master
hauntsaninja:narrowcontainhttps://github.com/hauntsaninja/mypy/tree/narrowcontain
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Dec 30, 2025https://github.com/python/mypy/pull/20492#issue-3769650923
Please reload this pagehttps://github.com/python/mypy/pull/20492
#17864https://github.com/python/mypy/issues/17864
#17841https://github.com/python/mypy/issues/17841
#18524https://github.com/python/mypy/issues/18524
#20041https://github.com/python/mypy/issues/20041
#17162https://github.com/python/mypy/issues/17162
#16830https://github.com/python/mypy/issues/16830
#13704https://github.com/python/mypy/issues/13704
#7642https://github.com/python/mypy/issues/7642
#3964https://github.com/python/mypy/issues/3964
Please reload this pagehttps://github.com/python/mypy/pull/20492
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
force-pushedhttps://github.com/python/mypy/compare/6e89ffd9a9e8e210b292dea8810fe1857c30319f..9e351d17b1c0685a142e090f60d9cd819245c081
6e89ffdhttps://github.com/python/mypy/commit/6e89ffd9a9e8e210b292dea8810fe1857c30319f
9e351d1https://github.com/python/mypy/commit/9e351d17b1c0685a142e090f60d9cd819245c081
Compare https://github.com/python/mypy/compare/6e89ffd9a9e8e210b292dea8810fe1857c30319f..9e351d17b1c0685a142e090f60d9cd819245c081
December 30, 2025 10:38https://github.com/python/mypy/pull/20492#event-21791625143
https://github.com/hauntsaninja
correct testshttps://github.com/python/mypy/pull/20492/commits/28fefe61bd6596314d6a5df96a00484257370e22
28fefe6https://github.com/python/mypy/pull/20492/commits/28fefe61bd6596314d6a5df96a00484257370e22
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492
hauntsaninjahttps://github.com/hauntsaninja
December 30, 2025 03:18https://github.com/python/mypy/pull/20492#commits-pushed-cce6a71
https://github.com/hauntsaninja
wiphttps://github.com/python/mypy/pull/20492/commits/cce6a713cc3daf9b5965e9ab973cffb1301cf089
cce6a71https://github.com/python/mypy/pull/20492/commits/cce6a713cc3daf9b5965e9ab973cffb1301cf089
https://github.com/hauntsaninja
incorrect testshttps://github.com/python/mypy/pull/20492/commits/cdbd7376612f68e715c5643674c5d6b972e57690
cdbd737https://github.com/python/mypy/pull/20492/commits/cdbd7376612f68e715c5643674c5d6b972e57690
https://github.com/hauntsaninja
commenthttps://github.com/python/mypy/pull/20492/commits/4dbd1070851daf4a4c8265a5b50cf2e4936f819d
4dbd107https://github.com/python/mypy/pull/20492/commits/4dbd1070851daf4a4c8265a5b50cf2e4936f819d
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
force-pushedhttps://github.com/python/mypy/compare/b29984a3f22cc9dbc33025dd7ef7972ec502347a..4dbd1070851daf4a4c8265a5b50cf2e4936f819d
b29984ahttps://github.com/python/mypy/commit/b29984a3f22cc9dbc33025dd7ef7972ec502347a
4dbd107https://github.com/python/mypy/commit/4dbd1070851daf4a4c8265a5b50cf2e4936f819d
Compare https://github.com/python/mypy/compare/b29984a3f22cc9dbc33025dd7ef7972ec502347a..4dbd1070851daf4a4c8265a5b50cf2e4936f819d
December 30, 2025 11:20https://github.com/python/mypy/pull/20492#event-21792161462
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492
https://github.com/hauntsaninja
avoid narrowing builtinshttps://github.com/python/mypy/pull/20492/commits/4a552d58db0a99345bf3790e06093b3838f4c77a
4a552d5https://github.com/python/mypy/pull/20492/commits/4a552d58db0a99345bf3790e06093b3838f4c77a
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
force-pushedhttps://github.com/python/mypy/compare/f574fefc5f10210de23c85772300678f6edb8d1e..4a552d58db0a99345bf3790e06093b3838f4c77a
f574fefhttps://github.com/python/mypy/commit/f574fefc5f10210de23c85772300678f6edb8d1e
4a552d5https://github.com/python/mypy/commit/4a552d58db0a99345bf3790e06093b3838f4c77a
Compare https://github.com/python/mypy/compare/f574fefc5f10210de23c85772300678f6edb8d1e..4a552d58db0a99345bf3790e06093b3838f4c77a
December 30, 2025 21:21https://github.com/python/mypy/pull/20492#event-21800188744
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492
https://github.com/hauntsaninja
more changeshttps://github.com/python/mypy/pull/20492/commits/ca5120dac41891349b34a4e47e85ab0468518884
ca5120dhttps://github.com/python/mypy/pull/20492/commits/ca5120dac41891349b34a4e47e85ab0468518884
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
force-pushedhttps://github.com/python/mypy/compare/d143ddc1e7b453a9e802667876d9f9665b8b22ec..ca5120dac41891349b34a4e47e85ab0468518884
d143ddchttps://github.com/python/mypy/commit/d143ddc1e7b453a9e802667876d9f9665b8b22ec
ca5120dhttps://github.com/python/mypy/commit/ca5120dac41891349b34a4e47e85ab0468518884
Compare https://github.com/python/mypy/compare/d143ddc1e7b453a9e802667876d9f9665b8b22ec..ca5120dac41891349b34a4e47e85ab0468518884
December 30, 2025 21:58https://github.com/python/mypy/pull/20492#event-21800545548
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492
hauntsaninjahttps://github.com/hauntsaninja
December 30, 2025 14:19https://github.com/python/mypy/pull/20492#commits-pushed-94c5be7
https://github.com/hauntsaninja
improve testhttps://github.com/python/mypy/pull/20492/commits/94c5be7cfc6b62932d4c19f586fd665696101808
94c5be7https://github.com/python/mypy/pull/20492/commits/94c5be7cfc6b62932d4c19f586fd665696101808
https://github.com/hauntsaninja
new testhttps://github.com/python/mypy/pull/20492/commits/92051d994189a8a4f3eae6ad256610b6ab90857f
92051d9https://github.com/python/mypy/pull/20492/commits/92051d994189a8a4f3eae6ad256610b6ab90857f
https://github.com/hauntsaninja
fixhttps://github.com/python/mypy/pull/20492/commits/586d2a1b01051bafbccfd6ef5b00a99191806ac5
586d2a1https://github.com/python/mypy/pull/20492/commits/586d2a1b01051bafbccfd6ef5b00a99191806ac5
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
force-pushedhttps://github.com/python/mypy/compare/bdfc626e43b46378de8248c25a732283bff49f7d..586d2a1b01051bafbccfd6ef5b00a99191806ac5
bdfc626https://github.com/python/mypy/commit/bdfc626e43b46378de8248c25a732283bff49f7d
586d2a1https://github.com/python/mypy/commit/586d2a1b01051bafbccfd6ef5b00a99191806ac5
Compare https://github.com/python/mypy/compare/bdfc626e43b46378de8248c25a732283bff49f7d..586d2a1b01051bafbccfd6ef5b00a99191806ac5
December 30, 2025 22:42https://github.com/python/mypy/pull/20492#event-21801005323
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492
https://github.com/apps/github-actions
github-actionshttps://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 viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492
https://github.com/hauntsaninja
clean uphttps://github.com/python/mypy/pull/20492/commits/7bc5dacc75ccba24f038cd0031dd2abd28b86bff
7bc5dachttps://github.com/python/mypy/pull/20492/commits/7bc5dacc75ccba24f038cd0031dd2abd28b86bff
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
force-pushedhttps://github.com/python/mypy/compare/0b15de0d34cfcd4dbf003639ba165e1b361bf90a..7bc5dacc75ccba24f038cd0031dd2abd28b86bff
0b15de0https://github.com/python/mypy/commit/0b15de0d34cfcd4dbf003639ba165e1b361bf90a
7bc5dachttps://github.com/python/mypy/commit/7bc5dacc75ccba24f038cd0031dd2abd28b86bff
Compare https://github.com/python/mypy/compare/0b15de0d34cfcd4dbf003639ba165e1b361bf90a..7bc5dacc75ccba24f038cd0031dd2abd28b86bff
December 30, 2025 23:25https://github.com/python/mypy/pull/20492#event-21801503806
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492
https://github.com/hauntsaninja
setattrhttps://github.com/python/mypy/pull/20492/commits/1ef7ab710deafd51edfdf1f2d76fb881cb9e498b
1ef7ab7https://github.com/python/mypy/pull/20492/commits/1ef7ab710deafd51edfdf1f2d76fb881cb9e498b
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20492
hauntsaninjahttps://github.com/hauntsaninja
December 30, 2025 19:02https://github.com/python/mypy/pull/20492#commits-pushed-5cc76be
https://github.com/hauntsaninja
improvehttps://github.com/python/mypy/pull/20492/commits/5cc76be1cc64480d74033b9357e92559c212a907
5cc76behttps://github.com/python/mypy/pull/20492/commits/5cc76be1cc64480d74033b9357e92559c212a907
https://github.com/hauntsaninja
.https://github.com/python/mypy/pull/20492/commits/54b4c8ed8f53e66679c18bfb311cf65372cc6ab4
54b4c8ehttps://github.com/python/mypy/pull/20492/commits/54b4c8ed8f53e66679c18bfb311cf65372cc6ab4
https://github.com/hauntsaninja
hauntsaninjahttps://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-Ogdenhttps://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
hauntsaninjahttps://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
#20595https://github.com/python/mypy/pull/20595
)https://github.com/python/mypy/commit/66f83ea328e40058d6f4e7e707672c2aa51fff31
66f83eahttps://github.com/python/mypy/commit/66f83ea328e40058d6f4e7e707672c2aa51fff31
#20492https://github.com/python/mypy/pull/20492
https://github.com/hauntsaninja
hauntsaninjahttps://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-Ogdenhttps://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
hauntsaninjahttps://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
#20598https://github.com/python/mypy/pull/20598
)https://github.com/python/mypy/commit/c72d4f1dee65dce69a78345c77632da95b613bb6
c72d4f1https://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
hauntsaninjahttps://github.com/hauntsaninja
Jan 17, 2026 https://github.com/python/mypy/pull/20492#ref-commit-e395104
https://github.com/hauntsaninja
Avoid narrowing TypeTypehttps://github.com/hauntsaninja/mypy/commit/e395104c90f3d8b68645dc782aa439c5ba4d865c
e395104https://github.com/hauntsaninja/mypy/commit/e395104c90f3d8b68645dc782aa439c5ba4d865c
python#20492https://github.com/python/mypy/pull/20492
https://github.com/A5rocks
A5rockshttps://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
cdce8phttps://github.com/cdce8p
Jan 17, 2026https://github.com/python/mypy/pull/20492#issuecomment-3763233475
Please reload this pagehttps://github.com/python/mypy/pull/20492
Please reload this pagehttps://github.com/python/mypy/pull/20492
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Jan 17, 2026https://github.com/python/mypy/pull/20492#issuecomment-3764298502
Please reload this pagehttps://github.com/python/mypy/pull/20492
https://github.com/hauntsaninja
hauntsaninjahttps://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
hauntsaninjahttps://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
#20609https://github.com/python/mypy/pull/20609
)https://github.com/python/mypy/commit/fb0845d66f10ec220e7ec69be98a2671527884d9
fb0845dhttps://github.com/python/mypy/commit/fb0845d66f10ec220e7ec69be98a2671527884d9
#20492https://github.com/python/mypy/pull/20492
#19753https://github.com/python/mypy/issues/19753
#20492 (comment)https://github.com/python/mypy/pull/20492#issuecomment-3763233475
hauntsaninjahttps://github.com/hauntsaninja
Jan 21, 2026 https://github.com/python/mypy/pull/20492#ref-commit-903fae1
https://github.com/hauntsaninja
Avoid narrowing TypeTypehttps://github.com/hauntsaninja/mypy/commit/903fae15bd8e0ee138d9e0e5bdd85c9984e7e570
903fae1https://github.com/hauntsaninja/mypy/commit/903fae15bd8e0ee138d9e0e5bdd85c9984e7e570
python#20492https://github.com/python/mypy/pull/20492
https://github.com/hauntsaninja
hauntsaninjahttps://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
hauntsaninjahttps://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
#20602https://github.com/python/mypy/pull/20602
)https://github.com/python/mypy/commit/b91f53c1b2d4cd12bf4e15781e447ebdd72f2b42
b91f53chttps://github.com/python/mypy/commit/b91f53c1b2d4cd12bf4e15781e447ebdd72f2b42
#17841https://github.com/python/mypy/issues/17841
#17864https://github.com/python/mypy/issues/17864
#17869https://github.com/python/mypy/pull/17869
#20492https://github.com/python/mypy/pull/20492
#3229https://github.com/python/mypy/issues/3229
#20234https://github.com/python/mypy/issues/20234
#18208https://github.com/python/mypy/issues/18208
#16774https://github.com/python/mypy/issues/16774
hauntsaninjahttps://github.com/hauntsaninja
Jan 22, 2026 https://github.com/python/mypy/pull/20492#ref-commit-46f4669
https://github.com/hauntsaninja
Avoid narrowing TypeTypehttps://github.com/hauntsaninja/mypy/commit/46f4669c31582146a4aa8333b1e92e2906532c41
46f4669https://github.com/hauntsaninja/mypy/commit/46f4669c31582146a4aa8333b1e92e2906532c41
python#20492https://github.com/python/mypy/pull/20492
hauntsaninjahttps://github.com/hauntsaninja
Jan 22, 2026 https://github.com/python/mypy/pull/20492#ref-commit-f342be8
https://github.com/hauntsaninja
[testing] Avoid narrowing TypeTypehttps://github.com/hauntsaninja/mypy/commit/f342be80c10981440297139ccb40521aaa25d801
f342be8https://github.com/hauntsaninja/mypy/commit/f342be80c10981440297139ccb40521aaa25d801
python#20492https://github.com/python/mypy/pull/20492
https://github.com/hauntsaninja
hauntsaninjahttps://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
hauntsaninjahttps://github.com/hauntsaninja
Jan 22, 2026 https://github.com/python/mypy/pull/20492#ref-commit-06d18ce
https://github.com/hauntsaninja
Avoid narrowing TypeTypehttps://github.com/hauntsaninja/mypy/commit/06d18ce73d3169eb2acb2533da639cd76706c5a8
06d18cehttps://github.com/hauntsaninja/mypy/commit/06d18ce73d3169eb2acb2533da639cd76706c5a8
python#20492https://github.com/python/mypy/pull/20492
https://github.com/hauntsaninja
hauntsaninjahttps://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
hauntsaninjahttps://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
#20643https://github.com/python/mypy/pull/20643
)https://github.com/python/mypy/commit/e64a84b118bb338ec6efd428d398e6ebd5b79bfc
e64a84bhttps://github.com/python/mypy/commit/e64a84b118bb338ec6efd428d398e6ebd5b79bfc
#20492 (comment)https://github.com/python/mypy/pull/20492#discussion_r2678846727
#20532https://github.com/python/mypy/issues/20532
#18029https://github.com/python/mypy/issues/18029
#17229https://github.com/python/mypy/issues/17229
#16465https://github.com/python/mypy/issues/16465
#18574https://github.com/python/mypy/pull/18574
hauntsaninjahttps://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
2502e17https://github.com/hauntsaninja/mypy/commit/2502e17f453147395ea3cc94149b99343c6b0535
python#20492https://github.com/python/mypy/pull/20492
hauntsaninjahttps://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
2ecb997https://github.com/hauntsaninja/mypy/commit/2ecb997a2482548284ab02ee40a353df24220cd6
python#20492https://github.com/python/mypy/pull/20492
https://github.com/hauntsaninja
hauntsaninjahttps://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
hauntsaninjahttps://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
92a1256https://github.com/hauntsaninja/mypy/commit/92a12565a4326e6df77787050583c756df81f8ea
python#20492https://github.com/python/mypy/pull/20492
JukkaLhttps://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
#20662https://github.com/python/mypy/pull/20662
)https://github.com/python/mypy/commit/edc47c6bbc59348ef8ae5ba97673397edbf09f4c
edc47c6https://github.com/python/mypy/commit/edc47c6bbc59348ef8ae5ba97673397edbf09f4c
#20492https://github.com/python/mypy/pull/20492
#20636https://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
JukkaLhttps://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
#20704https://github.com/python/mypy/pull/20704
)https://github.com/python/mypy/commit/ec4c463861fd8683f85fa0c34929e8fca499530f
ec4c463https://github.com/python/mypy/commit/ec4c463861fd8683f85fa0c34929e8fca499530f
#20701https://github.com/python/mypy/issues/20701
#20492https://github.com/python/mypy/pull/20492
#20643https://github.com/python/mypy/pull/20643
#20673https://github.com/python/mypy/pull/20673
#20492https://github.com/python/mypy/pull/20492
#20660https://github.com/python/mypy/pull/20660
https://github.com/hauntsaninja
hauntsaninjahttps://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 freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://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 pagehttps://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
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.