Title: Regression involving generic class methods · Issue #7925 · python/mypy · GitHub
Open Graph Title: Regression involving generic class methods · Issue #7925 · python/mypy
X Title: Regression involving generic class methods · Issue #7925 · python/mypy
Description: Distilled from an issue in S: from typing import Generic, List, Optional, TypeVar Q = TypeVar("Q") T = TypeVar("T", bound="RequestWrapper") class RequestWrapper(Generic[Q]): @classmethod def valid(cls, reqs): # type: (List[T]) -> List[T]...
Open Graph Description: Distilled from an issue in S: from typing import Generic, List, Optional, TypeVar Q = TypeVar("Q") T = TypeVar("T", bound="RequestWrapper") class RequestWrapper(Generic[Q]): @classmethod def valid(...
X Description: Distilled from an issue in S: from typing import Generic, List, Optional, TypeVar Q = TypeVar("Q") T = TypeVar("T", bound="RequestWrapper") class RequestWrapper(Generi...
Opengraph URL: https://github.com/python/mypy/issues/7925
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Regression involving generic class methods","articleBody":"Distilled from an issue in S:\r\n\r\n```\r\nfrom typing import Generic, List, Optional, TypeVar\r\n\r\nQ = TypeVar(\"Q\")\r\nT = TypeVar(\"T\", bound=\"RequestWrapper\")\r\n\r\nclass RequestWrapper(Generic[Q]):\r\n @classmethod\r\n def valid(cls, reqs):\r\n # type: (List[T]) -> List[T]\r\n pass\r\n\r\nclass _ConcreteRequestWrapper(RequestWrapper[int]):\r\n pass\r\n\r\ndef test(valid_reqs):\r\n # type: (List[_ConcreteRequestWrapper]) -> None\r\n _ConcreteRequestWrapper.valid(valid_reqs)\r\n```\r\n\r\nThis produces an error in `test`: `error: Argument 1 to \"valid\" of \"RequestWrapper\" has incompatible type \"List[_ConcreteRequestWrapper]\"; expected \"List[\u003cnothing>]\"`\r\n\r\nLooks like this was introduced in #7860.","author":{"url":"https://github.com/msullivan","@type":"Person","name":"msullivan"},"datePublished":"2019-11-11T21:48:32Z","url":"https://github.com/python/mypy/issues/7925"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9ba6db20-15c4-cb36-231f-1362ed0be0b3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A1FC:15E5F9:17E6831:20383D0:6AFFF163 |
| html-safe-nonce | 0f05df0ab1c4d431937b586e193fd36c2c276be6e740c9d8b3881402851fcbb9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUZDOjE1RTVGOToxN0U2ODMxOjIwMzgzRDA6NkFGRkYxNjMiLCJ2aXNpdG9yX2lkIjoiNjQ1MTk5NjQyMDQxNjIwNTE1NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fb210a480375f1fbe73950a90321c3a82de8c197fec1652e089c7edd2d4359ac |
| hovercard-subject-tag | issue:521206014 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/7925/issue_layout |
| twitter:image | https://opengraph.githubassets.com/be884c5c48a32a46ebf8c0f9abfe416f503417669b5a4ab0763e93a67b936a50/python/mypy/issues/7925 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/be884c5c48a32a46ebf8c0f9abfe416f503417669b5a4ab0763e93a67b936a50/python/mypy/issues/7925 |
| og:image:alt | Distilled from an issue in S: from typing import Generic, List, Optional, TypeVar Q = TypeVar("Q") T = TypeVar("T", bound="RequestWrapper") class RequestWrapper(Generic[Q]): @classmethod def valid(... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | msullivan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width