René's URL Explorer Experiment


Title: Recognize comparison with Ellipsis · Issue #2180 · python/mypy · GitHub

Open Graph Title: Recognize comparison with Ellipsis · Issue #2180 · python/mypy

X Title: Recognize comparison with Ellipsis · Issue #2180 · python/mypy

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

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

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

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Recognize comparison with Ellipsis","articleBody":"Consider the following program:\n\n```\nimport builtins\nfrom typing import Any, Optional, Union\n\ndef func1() -> Optional[str]:\n    multi_state = 'value'  # type: Optional[str]\n    if multi_state is None:\n        return None\n    reveal_type(multi_state)\n    return multi_state\n\ndef func2() -> Any:\n    multi_state = 'value'  # type: Union[str, builtins.ellipsis]\n    if multi_state is Ellipsis:\n        return None\n    reveal_type(multi_state)\n    return multi_state\n\nfunc1()\nfunc2()\n```\n\nIf I typecheck with:\n\n```\n$ mypy --strict-optional --suppress-error-context test_recognize_ellipsis_comparison.py\n```\n\nI get:\n\n```\ntest_recognize_ellipsis_comparison.py:8: error: Revealed type is 'builtins.str'\ntest_recognize_ellipsis_comparison.py:15: error: Revealed type is 'Union[builtins.str, builtins.ellipsis]'\n```\n\nBut expect:\n\n```\ntest_recognize_ellipsis_comparison.py:8: error: Revealed type is 'builtins.str'\ntest_recognize_ellipsis_comparison.py:15: error: Revealed type is 'builtins.str'\n```\n\nThis suggests that mypy does not recognize the comparison `value is Ellipsis` in the same way that it recognizes `value is None`.\n\nIn my own codebase having explicit recognition for Ellipsis would be useful in some functions that use both None and Ellipsis as sentinel values.\n","author":{"url":"https://github.com/davidfstr","@type":"Person","name":"davidfstr"},"datePublished":"2016-09-24T22:05:01Z","url":"https://github.com/python/mypy/issues/2180"}

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/:user_id/:repository/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:1eb9716c-4fd0-6636-bd04-633a8da996f4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id830C:382035:40D985:5A5C2E:6B007038
html-safe-noncee4e8c82325172576838f5c461b4cfd6cac0f618da59ed1405176125ee477fcf9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzBDOjM4MjAzNTo0MEQ5ODU6NUE1QzJFOjZCMDA3MDM4IiwidmlzaXRvcl9pZCI6Ijg3NjQ4MTE0MzI4NjE2NTkxOTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac9a02a57bae65be089a271802f532d6d546605da7b96e75894771340d7ac0b199
hovercard-subject-tagrepository:7053637
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/mypy/issues/2180
twitter:imagehttps://opengraph.githubassets.com/f79ae5636353a0db17350af0a02700f2e9c3bbcf096f9450bf0c369c77cd1022/python/mypy
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f79ae5636353a0db17350af0a02700f2e9c3bbcf096f9450bf0c369c77cd1022/python/mypy
og:image:altOptional static typing for Python. Contribute to python/mypy development by creating an account on GitHub.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None6527e91c60c0b29d16606ff32ac5df8ecdc37a2a62205ea057a14d7762c870fa
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
release46f1cd2ae3cd8ae1a81019b5d619742e76f13bbd
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/2180#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F2180
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%2Fissues%2F2180
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=python%2Fmypy
Reloadhttps://github.com/python/mypy/issues/2180
Reloadhttps://github.com/python/mypy/issues/2180
Reloadhttps://github.com/python/mypy/issues/2180
https://github.com/python/mypy
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/2180
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/2180
Recognize comparison with Ellipsishttps://github.com/python/mypy/issues/2180#top
https://github.com/davidfstr
davidfstrhttps://github.com/davidfstr
on Sep 24, 2016https://github.com/python/mypy/issues/2180#issue-179054644
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Sep 24, 2016https://github.com/python/mypy/issues/2180#issuecomment-249393838
#1803https://github.com/python/mypy/issues/1803
https://github.com/davidfstr
davidfstrhttps://github.com/davidfstr
on Sep 25, 2016https://github.com/python/mypy/issues/2180#issuecomment-249400408
#1803https://github.com/python/mypy/issues/1803
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Sep 25, 2016https://github.com/python/mypy/issues/2180#issuecomment-249400584
#1803https://github.com/python/mypy/issues/1803
gvanrossumhttps://github.com/gvanrossum
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Sep 25, 2016https://github.com/python/mypy/issues/2180#event-801413708
https://github.com/davidfstr
davidfstrhttps://github.com/davidfstr
on Sep 25, 2016https://github.com/python/mypy/issues/2180#issuecomment-249401037
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Sep 25, 2016https://github.com/python/mypy/issues/2180#issuecomment-249401701
https://github.com/relikd
relikdhttps://github.com/relikd
on Apr 12, 2022https://github.com/python/mypy/issues/2180#issuecomment-1097079070
https://github.com/erictraut
erictrauthttps://github.com/erictraut
on Apr 12, 2022https://github.com/python/mypy/issues/2180#issuecomment-1097116994
https://github.com/relikd
relikdhttps://github.com/relikd
on Apr 12, 2022https://github.com/python/mypy/issues/2180#issuecomment-1097250411
https://github.com/erictraut
erictrauthttps://github.com/erictraut
on Apr 12, 2022https://github.com/python/mypy/issues/2180#issuecomment-1097278266
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/2180
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/2180
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.