Title: PEP-612 Concatenate not recognized properly · Issue #11833 · python/mypy · GitHub
Open Graph Title: PEP-612 Concatenate not recognized properly · Issue #11833 · python/mypy
X Title: PEP-612 Concatenate not recognized properly · Issue #11833 · python/mypy
Description: Please consider example from PEP-612 from typing import Concatenate, Callable, TypeVar, ParamSpec R = TypeVar('R') P = ParamSpec('P') class Request: pass def with_request(f: Callable[Concatenate[Request, P], R]) -> Callable[P, R]: def in...
Open Graph Description: Please consider example from PEP-612 from typing import Concatenate, Callable, TypeVar, ParamSpec R = TypeVar('R') P = ParamSpec('P') class Request: pass def with_request(f: Callable[Concatenate[Re...
X Description: Please consider example from PEP-612 from typing import Concatenate, Callable, TypeVar, ParamSpec R = TypeVar('R') P = ParamSpec('P') class Request: pass def with_request(f: Callabl...
Opengraph URL: https://github.com/python/mypy/issues/11833
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PEP-612 Concatenate not recognized properly","articleBody":"Please consider example from PEP-612\r\n\r\n```\r\nfrom typing import Concatenate, Callable, TypeVar, ParamSpec\r\n\r\nR = TypeVar('R')\r\nP = ParamSpec('P')\r\n\r\nclass Request:\r\n pass\r\n\r\ndef with_request(f: Callable[Concatenate[Request, P], R]) -> Callable[P, R]:\r\n def inner(*args: P.args, **kwargs: P.kwargs) -> R:\r\n return f(Request(), *args, **kwargs)\r\n return inner\r\n```\r\nthen\r\n```\r\n$ mypy t6.py\r\nt6.py:9: error: The first argument to Callable must be a list of types or \"...\"\r\nFound 1 error in 1 file (checked 1 source file)\r\n```\r\nI would expect `Concatenate` to be accepted as the first argument of Callable.\r\n\r\nMypy 0.930, Python 3.10.1","author":{"url":"https://github.com/wrobell","@type":"Person","name":"wrobell"},"datePublished":"2021-12-23T10:23:16Z","url":"https://github.com/python/mypy/issues/11833"}
| 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:ba49239b-1cf6-1051-5249-37740141d73b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D0E2:2E9DBB:21E86FE:2E46C24:6B002A06 |
| html-safe-nonce | 34eeea59c66c1a2b27e5b82becba7bd01a05d2d229f21e40e751be7d3e660dc0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMEUyOjJFOURCQjoyMUU4NkZFOjJFNDZDMjQ6NkIwMDJBMDYiLCJ2aXNpdG9yX2lkIjoiNjQxMTc1MjY2Mjc1MjA0NTU3NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e225437f3fe4ddc1c1108e6ece8ab147a4a51adf5138316d7bcb5e6d77aa2d89 |
| hovercard-subject-tag | issue:1087578271 |
| 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/11833/issue_layout |
| twitter:image | https://opengraph.githubassets.com/562230e11720661050d584dabc9b9992a33c8fa19c23345f11089a614ec47e9d/python/mypy/issues/11833 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/562230e11720661050d584dabc9b9992a33c8fa19c23345f11089a614ec47e9d/python/mypy/issues/11833 |
| og:image:alt | Please consider example from PEP-612 from typing import Concatenate, Callable, TypeVar, ParamSpec R = TypeVar('R') P = ParamSpec('P') class Request: pass def with_request(f: Callable[Concatenate[Re... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wrobell |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| 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 | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width