René's URL Explorer Experiment


Title: Handle Self wrapped in Annotated when checking the expected self type by EmmanuelNiyonshuti · Pull Request #21928 · python/mypy · GitHub

Open Graph Title: Handle Self wrapped in Annotated when checking the expected self type by EmmanuelNiyonshuti · Pull Request #21928 · python/mypy

X Title: Handle Self wrapped in Annotated when checking the expected self type by EmmanuelNiyonshuti · Pull Request #21928 · python/mypy

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

Open Graph Description: Fixes #21917 Self wrapped in Annotated was not being recognized as an expected self type. This PR updates is_expected_self_type to recurse through Annotated when checking unbound types.

X Description: Fixes #21917 Self wrapped in Annotated was not being recognized as an expected self type. This PR updates is_expected_self_type to recurse through Annotated when checking unbound types.

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

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
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:25dfd9f4-7179-8402-edfa-0f1a8659eadd
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD7CE:9E1B2:2589C6F:3100EC4:6AFFF7A0
html-safe-nonce35da01f1c4c94117b37da29f8c5cc675f9c3dfaa8e902e0217cdeeb2cdbd9a21
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0NFOjlFMUIyOjI1ODlDNkY6MzEwMEVDNDo2QUZGRjdBMCIsInZpc2l0b3JfaWQiOiI2MDIxNTc0MDIyMjg0NzAzNjQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac0a385a35c538e5e490813502591c80c1c7b853eb9dcdb903ca6eda1ca48866b1
hovercard-subject-tagpull_request:4422397540
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/21928/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/6dc3627741440b186c5e22d2d514fc48b9f6b623a22ebc21769d0a001998e93d/python/mypy/pull/21928
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6dc3627741440b186c5e22d2d514fc48b9f6b623a22ebc21769d0a001998e93d/python/mypy/pull/21928
og:image:altFixes #21917 Self wrapped in Annotated was not being recognized as an expected self type. This PR updates is_expected_self_type to recurse through Annotated when checking unbound types.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameEmmanuelNiyonshuti
hostnamegithub.com
expected-hostnamegithub.com
None0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729
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
release16a11879678aaf97e2a42c33ee70830aa084fa37
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/mypy/pull/21928#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F21928
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F21928
Sign uphttps://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/21928
Reloadhttps://github.com/python/mypy/pull/21928
Reloadhttps://github.com/python/mypy/pull/21928
pythonhttps://github.com/python
mypyhttps://github.com/python/mypy
Codehttps://github.com/python/mypy
Issues2.7k (2.7k)https://github.com/python/mypy/issues
Pull requests547 (547)https://github.com/python/mypy/pulls
Actionshttps://github.com/python/mypy/actions
Projectshttps://github.com/python/mypy/projects
Wikihttps://github.com/python/mypy/wiki
Security and qualityhttps://github.com/python/mypy/security
Insightshttps://github.com/python/mypy/insights
https://github.com/python/mypy
ilevkivskyihttps://github.com/ilevkivskyi
python:masterhttps://github.com/python/mypy/tree/master
EmmanuelNiyonshuti:fix-expected-annotated-self-typehttps://github.com/EmmanuelNiyonshuti/mypy/tree/fix-expected-annotated-self-type
Conversationhttps://github.com/python/mypy/pull/21928
Commits2 (2)https://github.com/python/mypy/pull/21928/commits
Checkshttps://github.com/python/mypy/pull/21928/checks
Files changedhttps://github.com/python/mypy/pull/21928/files
Handle Self wrapped in Annotated when checking the expected self typehttps://github.com/python/mypy/pull/21928#top
ilevkivskyihttps://github.com/ilevkivskyi
python:masterhttps://github.com/python/mypy/tree/master
EmmanuelNiyonshuti:fix-expected-annotated-self-typehttps://github.com/EmmanuelNiyonshuti/mypy/tree/fix-expected-annotated-self-type
https://github.com/EmmanuelNiyonshuti
EmmanuelNiyonshutihttps://github.com/EmmanuelNiyonshuti
Sep 2, 2026https://github.com/python/mypy/pull/21928#issue-5324157982
#21917https://github.com/python/mypy/issues/21917
Please reload this pagehttps://github.com/python/mypy/pull/21928
https://github.com/EmmanuelNiyonshuti
fix-21917https://github.com/python/mypy/pull/21928/commits/7848677b05d9c7d7b6a350ba58d3f745ee4a2771
7848677https://github.com/python/mypy/pull/21928/commits/7848677b05d9c7d7b6a350ba58d3f745ee4a2771
https://github.com/EmmanuelNiyonshuti
EmmanuelNiyonshutihttps://github.com/EmmanuelNiyonshuti
Sep 2, 2026https://github.com/python/mypy/pull/21928#event-30416131248
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F21928
https://github.com/A5rocks
A5rockshttps://github.com/A5rocks
Sep 6, 2026 https://github.com/python/mypy/pull/21928#pullrequestreview-5124420215
View reviewed changes https://github.com/python/mypy/pull/21928/files/7848677b05d9c7d7b6a350ba58d3f745ee4a2771
A5rockshttps://github.com/A5rocks
https://github.com/python/mypy/pull/21928#pullrequestreview-5124420215
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/21928
test-data/unit/check-selftype.testhttps://github.com/python/mypy/pull/21928/files/7848677b05d9c7d7b6a350ba58d3f745ee4a2771#diff-7690321e25f861b0a13b8e3849b2187b167c2c47f417b035067f3d857cd968c1
Please reload this pagehttps://github.com/python/mypy/pull/21928
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F21928
https://github.com/EmmanuelNiyonshuti
EmmanuelNiyonshutihttps://github.com/EmmanuelNiyonshuti
Sep 6, 2026https://github.com/python/mypy/pull/21928#issuecomment-5557910054
Please reload this pagehttps://github.com/python/mypy/pull/21928
https://github.com/Moussa-Mikhail
Moussa-Mikhailhttps://github.com/Moussa-Mikhail
Sep 6, 2026https://github.com/python/mypy/pull/21928#issuecomment-5559685067
Please reload this pagehttps://github.com/python/mypy/pull/21928
https://github.com/EmmanuelNiyonshuti
add a check for classmethodshttps://github.com/python/mypy/pull/21928/commits/f5696b431cdf8405c81a42075ffc7116d3661235
f5696b4https://github.com/python/mypy/pull/21928/commits/f5696b431cdf8405c81a42075ffc7116d3661235
https://github.com/EmmanuelNiyonshuti
EmmanuelNiyonshutihttps://github.com/EmmanuelNiyonshuti
force-pushedhttps://github.com/python/mypy/compare/4749787c88ee10f7a59ab3cee2298882dd34ca16..f5696b431cdf8405c81a42075ffc7116d3661235
4749787https://github.com/python/mypy/commit/4749787c88ee10f7a59ab3cee2298882dd34ca16
f5696b4https://github.com/python/mypy/commit/f5696b431cdf8405c81a42075ffc7116d3661235
Compare https://github.com/python/mypy/compare/4749787c88ee10f7a59ab3cee2298882dd34ca16..f5696b431cdf8405c81a42075ffc7116d3661235
September 8, 2026 19:15https://github.com/python/mypy/pull/21928#event-30779180498
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Sep 8, 2026https://github.com/python/mypy/pull/21928#issuecomment-5590739181
mypy_primerhttps://github.com/hauntsaninja/mypy_primer
Please reload this pagehttps://github.com/python/mypy/pull/21928
https://github.com/EmmanuelNiyonshuti
EmmanuelNiyonshutihttps://github.com/EmmanuelNiyonshuti
Sep 8, 2026 https://github.com/python/mypy/pull/21928#ref-issue-5392211569
Self is not rejected when used as a PEP 695 type parameter bound #21960 https://github.com/python/mypy/issues/21960
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
99eef8bhttps://github.com/python/mypy/commit/99eef8bd0c44319a264bc7c27d9338c512b9eee1
Sep 8, 2026https://github.com/python/mypy/pull/21928#event-30791212054
Please reload this pagehttps://github.com/python/mypy/pull/21928
https://github.com/EmmanuelNiyonshuti
EmmanuelNiyonshutihttps://github.com/EmmanuelNiyonshuti
September 9, 2026 04:39https://github.com/python/mypy/pull/21928#event-30802450750
https://github.com/EmmanuelNiyonshuti
EmmanuelNiyonshutihttps://github.com/EmmanuelNiyonshuti
Sep 14, 2026https://github.com/python/mypy/pull/21928#issuecomment-5660423561
mypy/mypy/semanal.pyhttps://github.com/python/mypy/blob/2ee4f4f4631099201b192528ae48ef65e2c3c60c/mypy/semanal.py#L1199-L1203
2ee4f4fhttps://github.com/python/mypy/commit/2ee4f4f4631099201b192528ae48ef65e2c3c60c
Please reload this pagehttps://github.com/python/mypy/pull/21928
https://github.com/Moussa-Mikhail
Moussa-Mikhailhttps://github.com/Moussa-Mikhail
Oct 12, 2026 https://github.com/python/mypy/pull/21928#ref-issue-5806837047
self: Ident[Self] wrongly rejected for an identity type alias (type Ident[T] = T). #22181 https://github.com/python/mypy/issues/22181
https://github.com/chrikrah
chrikrahhttps://github.com/chrikrah
Oct 22, 2026 https://github.com/python/mypy/pull/21928#ref-pullrequest-5806948651
Fix self in identity alias #22182 https://github.com/python/mypy/pull/22182
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%2F21928
https://github.com/A5rocks
A5rocks https://github.com/A5rocks
https://github.com/python/mypy/pull/21928/files/7848677b05d9c7d7b6a350ba58d3f745ee4a2771
Please reload this pagehttps://github.com/python/mypy/pull/21928
mypy errors on self: Annotated[Self, "tag"] https://github.com/python/mypy/issues/21917
Please reload this pagehttps://github.com/python/mypy/pull/21928
https://github.com/EmmanuelNiyonshuti
https://github.com/Moussa-Mikhail
https://github.com/A5rocks
https://github.com/ilevkivskyi
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.