René's URL Explorer Experiment


Title: Adds docs for TypeGuard type, #10591 by sobolevn · Pull Request #10758 · python/mypy · GitHub

Open Graph Title: Adds docs for TypeGuard type, #10591 by sobolevn · Pull Request #10758 · python/mypy

X Title: Adds docs for TypeGuard type, #10591 by sobolevn · Pull Request #10758 · python/mypy

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

Open Graph Description: I am writting an article about TypeGuards and I've noticed that mypy does not document how TypeGuards work. So, here it is! It has several examples from the PEP itself and several custom ones. ...

X Description: I am writting an article about TypeGuards and I've noticed that mypy does not document how TypeGuards work. So, here it is! It has several examples from the PEP itself and several custom on...

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

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:ad35f2ae-1535-2dd6-3368-c91a7454af76
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCDEE:3F9D33:2ABFDD7:3A39990:6B00527C
html-safe-nonce0c39dd88d55d80ba10a65da19b601c4fa1851a6938c3b7db10917707ad7b0c69
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDREVFOjNGOUQzMzoyQUJGREQ3OjNBMzk5OTA6NkIwMDUyN0MiLCJ2aXNpdG9yX2lkIjoiNzIwNTM3NjE4NzEzMDk5MTIyOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd06130d9c9b618695110e3e337bc6047f673f9ff55e67c05c1f8f25992995927
hovercard-subject-tagpull_request:682489602
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/10758/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/c5b3db775a83d5be5fdb37b1b78f9e4c3ee7ef539bbe9087a2744b85cabfd8ab/python/mypy/pull/10758
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c5b3db775a83d5be5fdb37b1b78f9e4c3ee7ef539bbe9087a2744b85cabfd8ab/python/mypy/pull/10758
og:image:altI am writting an article about TypeGuards and I've noticed that mypy does not document how TypeGuards work. So, here it is! It has several examples from the PEP itself and several custom ones. ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesobolevn
hostnamegithub.com
expected-hostnamegithub.com
Nonef420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb
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
release26e00df917aba0f128135dc073ea0c5e33a70d40
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/mypy/pull/10758#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F10758
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%2F10758
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/10758
Reloadhttps://github.com/python/mypy/pull/10758
Reloadhttps://github.com/python/mypy/pull/10758
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 requests546 (546)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
hauntsaninjahttps://github.com/hauntsaninja
python:masterhttps://github.com/python/mypy/tree/master
Conversationhttps://github.com/python/mypy/pull/10758
Commits16 (16)https://github.com/python/mypy/pull/10758/commits
Checkshttps://github.com/python/mypy/pull/10758/checks
Files changedhttps://github.com/python/mypy/pull/10758/files
Adds docs for TypeGuard type, #10591https://github.com/python/mypy/pull/10758#top
hauntsaninjahttps://github.com/hauntsaninja
python:masterhttps://github.com/python/mypy/tree/master
https://github.com/sobolevn
sobolevnhttps://github.com/sobolevn
Jul 2, 2021https://github.com/python/mypy/pull/10758#issue-935605213
Please reload this pagehttps://github.com/python/mypy/pull/10758
#10591https://github.com/python/mypy/issues/10591
Please reload this pagehttps://github.com/python/mypy/pull/10758
sobolevnhttps://github.com/sobolevn
July 2, 2021 12:49https://github.com/python/mypy/pull/10758#commits-pushed-9054e8b
https://github.com/sobolevn
Adds docs for TypeGuard,https://github.com/python/mypy/pull/10758/commits/9054e8be5239ef65c6fdddbd24fc9bb193605ecf
closeshttps://github.com/python/mypy/pull/10758/commits/9054e8be5239ef65c6fdddbd24fc9bb193605ecf
#10591https://github.com/python/mypy/issues/10591
9054e8bhttps://github.com/python/mypy/pull/10758/commits/9054e8be5239ef65c6fdddbd24fc9bb193605ecf
https://github.com/sobolevn
Minor tweakshttps://github.com/python/mypy/pull/10758/commits/c249016f8466aa8219a7227a4c2f3de6c53734c8
c249016https://github.com/python/mypy/pull/10758/commits/c249016f8466aa8219a7227a4c2f3de6c53734c8
https://github.com/sobolevn
Formatting fixhttps://github.com/python/mypy/pull/10758/commits/19bdb7c72b4392eec451644a03b415a9ddb80035
19bdb7chttps://github.com/python/mypy/pull/10758/commits/19bdb7c72b4392eec451644a03b415a9ddb80035
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Jul 2, 2021 https://github.com/python/mypy/pull/10758#ref-issue-915177928
Wrong type inference with generics #10593 https://github.com/python/mypy/issues/10593
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
Jul 9, 2021 https://github.com/python/mypy/pull/10758#pullrequestreview-702601810
View reviewed changes https://github.com/python/mypy/pull/10758/files/19bdb7c72b4392eec451644a03b415a9ddb80035
JelleZijlstrahttps://github.com/JelleZijlstra
https://github.com/python/mypy/pull/10758#pullrequestreview-702601810
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/10758
docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/files/19bdb7c72b4392eec451644a03b415a9ddb80035#diff-87c8593afdbc2d7e16bb14afe4f1f7db35dc81c682ef11650973931028fad6af
Please reload this pagehttps://github.com/python/mypy/pull/10758
docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/files/19bdb7c72b4392eec451644a03b415a9ddb80035#diff-87c8593afdbc2d7e16bb14afe4f1f7db35dc81c682ef11650973931028fad6af
Please reload this pagehttps://github.com/python/mypy/pull/10758
docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/files/19bdb7c72b4392eec451644a03b415a9ddb80035#diff-87c8593afdbc2d7e16bb14afe4f1f7db35dc81c682ef11650973931028fad6af
Please reload this pagehttps://github.com/python/mypy/pull/10758
docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/files/19bdb7c72b4392eec451644a03b415a9ddb80035#diff-87c8593afdbc2d7e16bb14afe4f1f7db35dc81c682ef11650973931028fad6af
Please reload this pagehttps://github.com/python/mypy/pull/10758
sobolevnhttps://github.com/sobolevn
July 9, 2021 11:27https://github.com/python/mypy/pull/10758#commits-pushed-a86116c
https://github.com/sobolevn
https://github.com/JelleZijlstra
Update docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/commits/a86116c6b4276fdac6148c3960aed3d2a8ef9871
a86116chttps://github.com/python/mypy/pull/10758/commits/a86116c6b4276fdac6148c3960aed3d2a8ef9871
https://github.com/sobolevn
https://github.com/JelleZijlstra
Update docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/commits/d2f799533b82e1b82b9a5d48aaa0581a8ffd3a29
d2f7995https://github.com/python/mypy/pull/10758/commits/d2f799533b82e1b82b9a5d48aaa0581a8ffd3a29
https://github.com/sobolevn
https://github.com/JelleZijlstra
Update docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/commits/5c26a7cb2f9f33c2ec09a6ff5273c8b193321037
5c26a7chttps://github.com/python/mypy/pull/10758/commits/5c26a7cb2f9f33c2ec09a6ff5273c8b193321037
https://github.com/sobolevn
https://github.com/JelleZijlstra
Update docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/commits/80eeace6bd1724cbd64aa45eb9ba0b0dc1eb052d
80eeacehttps://github.com/python/mypy/pull/10758/commits/80eeace6bd1724cbd64aa45eb9ba0b0dc1eb052d
https://github.com/sobolevn
sobolevnhttps://github.com/sobolevn
Jul 9, 2021https://github.com/python/mypy/pull/10758#issuecomment-877021065
@JelleZijlstrahttps://github.com/JelleZijlstra
Please reload this pagehttps://github.com/python/mypy/pull/10758
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Jul 13, 2021 https://github.com/python/mypy/pull/10758#pullrequestreview-705499942
View reviewed changes https://github.com/python/mypy/pull/10758/files/80eeace6bd1724cbd64aa45eb9ba0b0dc1eb052d
docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/files/80eeace6bd1724cbd64aa45eb9ba0b0dc1eb052d#diff-87c8593afdbc2d7e16bb14afe4f1f7db35dc81c682ef11650973931028fad6af
Please reload this pagehttps://github.com/python/mypy/pull/10758
docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/files/80eeace6bd1724cbd64aa45eb9ba0b0dc1eb052d#diff-87c8593afdbc2d7e16bb14afe4f1f7db35dc81c682ef11650973931028fad6af
Please reload this pagehttps://github.com/python/mypy/pull/10758
docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/files/80eeace6bd1724cbd64aa45eb9ba0b0dc1eb052d#diff-87c8593afdbc2d7e16bb14afe4f1f7db35dc81c682ef11650973931028fad6af
Please reload this pagehttps://github.com/python/mypy/pull/10758
docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/files/80eeace6bd1724cbd64aa45eb9ba0b0dc1eb052d#diff-87c8593afdbc2d7e16bb14afe4f1f7db35dc81c682ef11650973931028fad6af
Please reload this pagehttps://github.com/python/mypy/pull/10758
docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/files/80eeace6bd1724cbd64aa45eb9ba0b0dc1eb052d#diff-87c8593afdbc2d7e16bb14afe4f1f7db35dc81c682ef11650973931028fad6af
Please reload this pagehttps://github.com/python/mypy/pull/10758
docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/files/80eeace6bd1724cbd64aa45eb9ba0b0dc1eb052d#diff-87c8593afdbc2d7e16bb14afe4f1f7db35dc81c682ef11650973931028fad6af
Please reload this pagehttps://github.com/python/mypy/pull/10758
docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/files/80eeace6bd1724cbd64aa45eb9ba0b0dc1eb052d#diff-87c8593afdbc2d7e16bb14afe4f1f7db35dc81c682ef11650973931028fad6af
Please reload this pagehttps://github.com/python/mypy/pull/10758
hauntsaninjahttps://github.com/hauntsaninja
July 13, 2021 11:15https://github.com/python/mypy/pull/10758#commits-pushed-2895bdd
https://github.com/hauntsaninja
Update docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/commits/2895bddc99e31b6abb7ce093454732f1cf7fd65c
2895bddhttps://github.com/python/mypy/pull/10758/commits/2895bddc99e31b6abb7ce093454732f1cf7fd65c
https://github.com/hauntsaninja
Update docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/commits/276b8a56b99bca56fff02536ba60b817b8b7eb89
276b8a5https://github.com/python/mypy/pull/10758/commits/276b8a56b99bca56fff02536ba60b817b8b7eb89
https://github.com/hauntsaninja
Update docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/commits/9f54e31bcf9eea8ddc0d99d900b0781eab8e008f
9f54e31https://github.com/python/mypy/pull/10758/commits/9f54e31bcf9eea8ddc0d99d900b0781eab8e008f
https://github.com/hauntsaninja
Update docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/commits/8a63abb31c40bd00dd7dc12eb43b34aae1ce0692
8a63abbhttps://github.com/python/mypy/pull/10758/commits/8a63abb31c40bd00dd7dc12eb43b34aae1ce0692
https://github.com/hauntsaninja
Update docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/commits/bddc54eb0ecceee9c9eb50ee87d1316b5e25d1b6
bddc54ehttps://github.com/python/mypy/pull/10758/commits/bddc54eb0ecceee9c9eb50ee87d1316b5e25d1b6
https://github.com/hauntsaninja
Update docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/commits/6db34e7fd55971321f2f319874b3f284e01a11cd
6db34e7https://github.com/python/mypy/pull/10758/commits/6db34e7fd55971321f2f319874b3f284e01a11cd
https://github.com/hauntsaninja
Update docs/source/casts.rsthttps://github.com/python/mypy/pull/10758/commits/3e3be74f367f555c019d27e6b032fb2d93f25187
3e3be74https://github.com/python/mypy/pull/10758/commits/3e3be74f367f555c019d27e6b032fb2d93f25187
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Jul 13, 2021https://github.com/python/mypy/pull/10758#issuecomment-879300105
Please reload this pagehttps://github.com/python/mypy/pull/10758
https://github.com/sobolevn
sobolevnhttps://github.com/sobolevn
Jul 17, 2021https://github.com/python/mypy/pull/10758#issuecomment-881893188
@JelleZijlstrahttps://github.com/JelleZijlstra
@hauntsaninjahttps://github.com/hauntsaninja
Please reload this pagehttps://github.com/python/mypy/pull/10758
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Jul 19, 2021https://github.com/python/mypy/pull/10758#issuecomment-882765388
Please reload this pagehttps://github.com/python/mypy/pull/10758
https://github.com/sobolevn
Moves TypeGuard docs from casts to more_typeshttps://github.com/python/mypy/pull/10758/commits/b79774b70d42606a237ef4af33284938959dfb20
b79774bhttps://github.com/python/mypy/pull/10758/commits/b79774b70d42606a237ef4af33284938959dfb20
https://github.com/sobolevn
sobolevnhttps://github.com/sobolevn
Jul 22, 2021https://github.com/python/mypy/pull/10758#issuecomment-884740306
Please reload this pagehttps://github.com/python/mypy/pull/10758
https://github.com/sobolevn
Moves TypeGuard docs from casts to more_typeshttps://github.com/python/mypy/pull/10758/commits/95e4c9749fcabff9a75ceba68d9dbbb91205d698
95e4c97https://github.com/python/mypy/pull/10758/commits/95e4c9749fcabff9a75ceba68d9dbbb91205d698
https://github.com/sobolevn
sobolevnhttps://github.com/sobolevn
Aug 3, 2021https://github.com/python/mypy/pull/10758#issuecomment-891800550
@hauntsaninjahttps://github.com/hauntsaninja
@JelleZijlstrahttps://github.com/JelleZijlstra
Please reload this pagehttps://github.com/python/mypy/pull/10758
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
0bafbfbhttps://github.com/python/mypy/commit/0bafbfbe316a9973062522984152a72699131273
Aug 3, 2021https://github.com/python/mypy/pull/10758#event-5106288204
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Aug 3, 2021https://github.com/python/mypy/pull/10758#issuecomment-892042106
Please reload this pagehttps://github.com/python/mypy/pull/10758
https://github.com/mcmasn-amzn
mcmasn-amznhttps://github.com/mcmasn-amzn
Sep 8, 2021 https://github.com/python/mypy/pull/10758#ref-issue-991410643
Docs: walrus TypeGuard #11075 https://github.com/python/mypy/issues/11075
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%2F10758
https://github.com/hauntsaninja
hauntsaninja https://github.com/hauntsaninja
https://github.com/python/mypy/pull/10758/files/80eeace6bd1724cbd64aa45eb9ba0b0dc1eb052d
https://github.com/JelleZijlstra
JelleZijlstra https://github.com/JelleZijlstra
https://github.com/python/mypy/pull/10758/files/19bdb7c72b4392eec451644a03b415a9ddb80035
Please reload this pagehttps://github.com/python/mypy/pull/10758
Document TypeGuard (PEP 647) https://github.com/python/mypy/issues/10591
Please reload this pagehttps://github.com/python/mypy/pull/10758
https://github.com/sobolevn
https://github.com/hauntsaninja
https://github.com/JelleZijlstra
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.