René's URL Explorer Experiment


Title: Invalid annotation in `SimplePath` protocol · Issue #468 · python/importlib_metadata · GitHub

Open Graph Title: Invalid annotation in `SimplePath` protocol · Issue #468 · python/importlib_metadata

X Title: Invalid annotation in `SimplePath` protocol · Issue #468 · python/importlib_metadata

Description: Hi! I was working on typeshed's types and we (well, @AlexWaygood) found that annotation of __truediv__ is not valid: importlib_metadata/importlib_metadata/_meta.py Lines 55 to 56 in 8e7b968 def __truediv__(self, other: Union[str, _T]) ->...

Open Graph Description: Hi! I was working on typeshed's types and we (well, @AlexWaygood) found that annotation of __truediv__ is not valid: importlib_metadata/importlib_metadata/_meta.py Lines 55 to 56 in 8e7b968 def __t...

X Description: Hi! I was working on typeshed's types and we (well, @AlexWaygood) found that annotation of __truediv__ is not valid: importlib_metadata/importlib_metadata/_meta.py Lines 55 to 56 in 8e7b968 def...

Opengraph URL: https://github.com/python/importlib_metadata/issues/468

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Invalid annotation in `SimplePath` protocol","articleBody":"Hi! \r\n\r\nI was working on `typeshed`'s types and we (well, @AlexWaygood) found that annotation of `__truediv__` is not valid: https://github.com/python/importlib_metadata/blob/8e7b9689fc38ef3e834265fd78423a9933a33607/importlib_metadata/_meta.py#L55-L56\r\n\r\nHere's a small repro: https://mypy-play.net/?mypy=latest&python=3.11&gist=2f16bbbbaf5a1330cbbcae76b5987868\r\n\r\n\r\n```python\r\nfrom typing import TypeVar\r\n\r\nT = TypeVar('T')\r\n\r\nclass A:\r\n    def method(self, other: T | str) -> T: ...\r\n\r\na: A\r\nreveal_type(a.method(1))  # N: Revealed type is \"builtins.int\"\r\nreveal_type(a.method('a'))  # N: Revealed type is \"\u003cnothing>\"\r\n```\r\n\r\nI propose using an `@overload` instead:\r\n\r\n```python\r\n\r\nfrom typing import TypeVar, overload\r\n\r\nT = TypeVar('T')\r\n\r\nclass A:\r\n    @overload\r\n    def method(self, other: str) -> str: ...\r\n    @overload\r\n    def method(self, other: T) -> T: ...\r\n\r\na: A\r\nreveal_type(a.method(1))  # N: Revealed type is \"builtins.int\"\r\nreveal_type(a.method('a'))  # N: Revealed type is \"builtins.str\"\r\n```\r\n\r\nPlayground: https://mypy-play.net/?mypy=latest&python=3.11\r\n\r\nI will send a PR with the fix :)","author":{"url":"https://github.com/sobolevn","@type":"Person","name":"sobolevn"},"datePublished":"2023-09-08T11:19:55Z","url":"https://github.com/python/importlib_metadata/issues/468"}

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/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:5dfce6af-d7f4-ab88-1c27-07ee948aa467
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEA72:3ABEF2:35EE12:481548:6B00A06B
html-safe-nonce8de695f7414cb06d50aeb7bedd2c1123d8ab7df59b86f5dc01b6e46db5e7b9a2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTcyOjNBQkVGMjozNUVFMTI6NDgxNTQ4OjZCMDBBMDZCIiwidmlzaXRvcl9pZCI6IjcxNTMxNjY5MDgyNzgyMTg4NTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac31c81206aae8cf6d4a8c20e41590a319a32071a2b1656a93dd716f8705d78ec2
hovercard-subject-tagissue:1887480293
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/importlib_metadata/468/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0eb679529683011779fb0bfe6ece07edb24bc90464fa4859b05646f43c6c0ea7/python/importlib_metadata/issues/468
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0eb679529683011779fb0bfe6ece07edb24bc90464fa4859b05646f43c6c0ea7/python/importlib_metadata/issues/468
og:image:altHi! I was working on typeshed's types and we (well, @AlexWaygood) found that annotation of __truediv__ is not valid: importlib_metadata/importlib_metadata/_meta.py Lines 55 to 56 in 8e7b968 def __t...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesobolevn
hostnamegithub.com
expected-hostnamegithub.com
None52c95ce7e48016ae14399656b4ee812462b6f1fa28c5008c8394da64794c00b8
turbo-cache-controlno-preview
go-importgithub.com/python/importlib_metadata git https://github.com/python/importlib_metadata.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id306448340
octolytics-dimension-repository_nwopython/importlib_metadata
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id306448340
octolytics-dimension-repository_network_root_nwopython/importlib_metadata
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
release1c9ddec8215f9a94e295c8310c3579b9c54ba31a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/importlib_metadata/issues/468#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fimportlib_metadata%2Fissues%2F468
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%2Fimportlib_metadata%2Fissues%2F468
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%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fimportlib_metadata
Reloadhttps://github.com/python/importlib_metadata/issues/468
Reloadhttps://github.com/python/importlib_metadata/issues/468
Reloadhttps://github.com/python/importlib_metadata/issues/468
pythonhttps://github.com/python
importlib_metadatahttps://github.com/python/importlib_metadata
Codehttps://github.com/python/importlib_metadata
Issues8 (8)https://github.com/python/importlib_metadata/issues
Pull requests6 (6)https://github.com/python/importlib_metadata/pulls
Actionshttps://github.com/python/importlib_metadata/actions
Projectshttps://github.com/python/importlib_metadata/projects
Wikihttps://github.com/python/importlib_metadata/wiki
Security and qualityhttps://github.com/python/importlib_metadata/security
Insightshttps://github.com/python/importlib_metadata/insights
https://github.com/python/importlib_metadata
New issuehttps://github.com/login?return_to=https://github.com/python/importlib_metadata/issues/468
New issuehttps://github.com/login?return_to=https://github.com/python/importlib_metadata/issues/468
Invalid annotation in SimplePath protocolhttps://github.com/python/importlib_metadata/issues/468#top
invalidThis doesn't seem righthttps://github.com/python/importlib_metadata/issues?q=state%3Aopen%20label%3A%22invalid%22
https://github.com/sobolevn
sobolevnhttps://github.com/sobolevn
on Sep 8, 2023https://github.com/python/importlib_metadata/issues/468#issue-1887480293
@AlexWaygoodhttps://github.com/AlexWaygood
importlib_metadata/importlib_metadata/_meta.pyhttps://github.com/python/importlib_metadata/blob/8e7b9689fc38ef3e834265fd78423a9933a33607/importlib_metadata/_meta.py#L55-L56
8e7b968https://github.com/python/importlib_metadata/commit/8e7b9689fc38ef3e834265fd78423a9933a33607
https://mypy-play.net/?mypy=latest&python=3.11&gist=2f16bbbbaf5a1330cbbcae76b5987868https://mypy-play.net/?mypy=latest&python=3.11&gist=2f16bbbbaf5a1330cbbcae76b5987868
https://mypy-play.net/?mypy=latest&python=3.11https://mypy-play.net/?mypy=latest&python=3.11
https://github.com/sobolevn
sobolevnhttps://github.com/sobolevn
on Sep 8, 2023https://github.com/python/importlib_metadata/issues/468#issuecomment-1711509213
https://github.com/jaraco
jaracohttps://github.com/jaraco
on Dec 14, 2023https://github.com/python/importlib_metadata/issues/468#issuecomment-1856610685
#469https://github.com/python/importlib_metadata/pull/469
jaracohttps://github.com/jaraco
completedhttps://github.com/python/importlib_metadata/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Dec 14, 2023https://github.com/python/importlib_metadata/issues/468#event-11252989349
jaracohttps://github.com/jaraco
invalidThis doesn't seem righthttps://github.com/python/importlib_metadata/issues?q=state%3Aopen%20label%3A%22invalid%22
on Dec 14, 2023https://github.com/python/importlib_metadata/issues/468#event-11252990587
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/importlib_metadata/issues/468
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/importlib_metadata/issues/468
invalidThis doesn't seem righthttps://github.com/python/importlib_metadata/issues?q=state%3Aopen%20label%3A%22invalid%22
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.