René's URL Explorer Experiment


Title: Reject bound covariant type variable in an argument type · Issue #734 · python/mypy · GitHub

Open Graph Title: Reject bound covariant type variable in an argument type · Issue #734 · python/mypy

X Title: Reject bound covariant type variable in an argument type · Issue #734 · python/mypy

Description: We should reject a bound covariant type variable in an argument type (i.e., in a contravariant position). For example, this should be rejected: T = TypeVar('T', covariant=True) class A(Generic[T]): def foo(self, x: T) -> None: ... # Can'...

Open Graph Description: We should reject a bound covariant type variable in an argument type (i.e., in a contravariant position). For example, this should be rejected: T = TypeVar('T', covariant=True) class A(Generic[T]):...

X Description: We should reject a bound covariant type variable in an argument type (i.e., in a contravariant position). For example, this should be rejected: T = TypeVar('T', covariant=True) class A(Gene...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Reject bound covariant type variable in an argument type","articleBody":"We should reject a bound covariant type variable in an argument type (i.e., in a contravariant position). For example, this should be rejected:\n\n```\nT = TypeVar('T', covariant=True)\nclass A(Generic[T]):\n    def foo(self, x: T) -> None: ...  # Can't use as argument type! Return type is okay.\n```\n\nSimilarly, a contravariant type variable should not be used in a return type.\n\nThe actual rule is probably a bit more involved than what I gave above, but this would probably cover most cases.\n","author":{"url":"https://github.com/JukkaL","@type":"Person","name":"JukkaL"},"datePublished":"2015-08-09T22:56:08Z","url":"https://github.com/python/mypy/issues/734"}

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:fd80c127-6f4f-db41-6f91-966b61c7ad24
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEE10:3E1195:2BFAA3:382235:6AFF97A4
html-safe-nonce0837311bbe93206175ef3e79d07c5e5bd5bf05f5884ae867e722f22b4cc2a59e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRTEwOjNFMTE5NToyQkZBQTM6MzgyMjM1OjZBRkY5N0E0IiwidmlzaXRvcl9pZCI6IjUzMjc0NTYxNDEzMDU2ODE4MjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac53cc0ca670e6aa5ebaae8f143acd27f4b89f67137571a2ddbce7ae4c6bd5833d
hovercard-subject-tagissue:99937887
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/mypy/734/issue_layout
twitter:imagehttps://opengraph.githubassets.com/afd536348ca0c09991ae15ca08d1203a2442818a0d7cdbdabac95ac41217f038/python/mypy/issues/734
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/afd536348ca0c09991ae15ca08d1203a2442818a0d7cdbdabac95ac41217f038/python/mypy/issues/734
og:image:altWe should reject a bound covariant type variable in an argument type (i.e., in a contravariant position). For example, this should be rejected: T = TypeVar('T', covariant=True) class A(Generic[T]):...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameJukkaL
hostnamegithub.com
expected-hostnamegithub.com
None2c75d045e8c84b51e2ac680086a6dd1eeaf2bc15b82137d22ee5106835d6256c
turbo-cache-controlno-preview
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
release525b66d22c4f7e6bb8b62934bec198964f7e8b93
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/734#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F734
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%2F734
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%2Fmypy
Reloadhttps://github.com/python/mypy/issues/734
Reloadhttps://github.com/python/mypy/issues/734
Reloadhttps://github.com/python/mypy/issues/734
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
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/734
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/734
Reject bound covariant type variable in an argument typehttps://github.com/python/mypy/issues/734#top
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
topic-type-variableshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-type-variables%22
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Aug 9, 2015https://github.com/python/mypy/issues/734#issue-99937887
JukkaLhttps://github.com/JukkaL
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
on Aug 9, 2015https://github.com/python/mypy/issues/734#event-377498294
jhancehttps://github.com/jhance
on Oct 10, 2015https://github.com/python/mypy/issues/734#event-432121315
A bit of enforcing of (co/contra)variance.https://github.com/jhance/mypy/commit/ec91695f7c9d719fe9710988d601ec0c6a58166a
https://docs.github.com/articles/closing-issues-via-commit-messages
ec91695https://github.com/jhance/mypy/commit/ec91695f7c9d719fe9710988d601ec0c6a58166a
[2/2] Some enforcing of (co/contra)variance.https://github.com/jhance/mypy/commit/041e4dbec79811cd84585aed116e4238fd34d56e
https://docs.github.com/articles/closing-issues-via-commit-messages
041e4dbhttps://github.com/jhance/mypy/commit/041e4dbec79811cd84585aed116e4238fd34d56e
https://github.com/jhance
jhancehttps://github.com/jhance
on Oct 11, 2015https://github.com/python/mypy/issues/734#issuecomment-147144952
jhancehttps://github.com/jhance
on Oct 11, 2015https://github.com/python/mypy/issues/734#event-432454899
[2/2] Some enforcing of (co/contra)variance.https://github.com/jhance/mypy/commit/5fc466b88b85e3660463ac87661f100fe3c50fd1
https://docs.github.com/articles/closing-issues-via-commit-messages
5fc466bhttps://github.com/jhance/mypy/commit/5fc466b88b85e3660463ac87661f100fe3c50fd1
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Oct 12, 2015https://github.com/python/mypy/issues/734#issuecomment-147271696
JukkaLhttps://github.com/JukkaL
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
5fc466bhttps://github.com/python/mypy/commit/5fc466b88b85e3660463ac87661f100fe3c50fd1
on Oct 12, 2015https://github.com/python/mypy/issues/734#event-432536762
JukkaLhttps://github.com/JukkaL
on Oct 12, 2015https://github.com/python/mypy/issues/734#event-432536763
Merge pull request #898 from jhance/cov-contrahttps://github.com/python/mypy/commit/6eb1e9210fcd23b1fe15add0cba46458d0b956db
#898https://github.com/python/mypy/pull/898
6eb1e92https://github.com/python/mypy/commit/6eb1e9210fcd23b1fe15add0cba46458d0b956db
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Oct 12, 2015https://github.com/python/mypy/issues/734#issuecomment-147273704
JukkaLhttps://github.com/JukkaL
on Oct 12, 2015https://github.com/python/mypy/issues/734#event-432541777
JukkaLhttps://github.com/JukkaL
topic-type-variableshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-type-variables%22
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
on May 18, 2018https://github.com/python/mypy/issues/734#event-1633303797
https://github.com/Emerentius
Emerentiushttps://github.com/Emerentius
on Oct 9, 2019https://github.com/python/mypy/issues/734#issuecomment-539895978
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Oct 9, 2019https://github.com/python/mypy/issues/734#issuecomment-540046829
@Emerentiushttps://github.com/Emerentius
https://github.com/Emerentius
Emerentiushttps://github.com/Emerentius
on Oct 9, 2019https://github.com/python/mypy/issues/734#issuecomment-540120864
PEP 591https://www.python.org/dev/peps/pep-0591/
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Oct 10, 2019https://github.com/python/mypy/issues/734#issuecomment-540572053
@ilevkivskyihttps://github.com/ilevkivskyi
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Oct 10, 2019https://github.com/python/mypy/issues/734#issuecomment-540591121
https://github.com/Emerentius
Emerentiushttps://github.com/Emerentius
on Oct 10, 2019https://github.com/python/mypy/issues/734#issuecomment-540803149
Result typehttps://doc.rust-lang.org/std/result/enum.Result.html
Option typehttps://doc.rust-lang.org/std/option/enum.Option.html
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Oct 11, 2019https://github.com/python/mypy/issues/734#issuecomment-541016134
https://github.com/sobolevn
sobolevnhttps://github.com/sobolevn
on Aug 16, 2020https://github.com/python/mypy/issues/734#issuecomment-674548492
@Emerentiushttps://github.com/Emerentius
https://github.com/dry-python/returns/blob/master/returns/maybe.pyhttps://github.com/dry-python/returns/blob/master/returns/maybe.py
https://github.com/KotlinIsland
KotlinIslandhttps://github.com/KotlinIsland
on Sep 26, 2023https://github.com/python/mypy/issues/734#issuecomment-1735669581
@JukkaLhttps://github.com/JukkaL
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/734
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/734
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
topic-type-variableshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-type-variables%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.