Title: ParamSpec too many arguments · Issue #12844 · python/mypy · GitHub
Open Graph Title: ParamSpec too many arguments · Issue #12844 · python/mypy
X Title: ParamSpec too many arguments · Issue #12844 · python/mypy
Description: Bug Report Passing list to a function which implements ParamSpec results in mypy throwing Too many arguments when trying to use the result. To Reproduce Example: from typing import Callable, TypeVar from typing_extensions import ParamSpe...
Open Graph Description: Bug Report Passing list to a function which implements ParamSpec results in mypy throwing Too many arguments when trying to use the result. To Reproduce Example: from typing import Callable, TypeVa...
X Description: Bug Report Passing list to a function which implements ParamSpec results in mypy throwing Too many arguments when trying to use the result. To Reproduce Example: from typing import Callable, TypeVa...
Opengraph URL: https://github.com/python/mypy/issues/12844
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ParamSpec too many arguments","articleBody":"**Bug Report**\r\n\r\nPassing `list` to a function which implements ParamSpec results in mypy throwing `Too many arguments` when trying to use the result.\r\n\r\n**To Reproduce**\r\n\r\nExample:\r\n```\r\nfrom typing import Callable, TypeVar\r\n\r\nfrom typing_extensions import ParamSpec\r\n\r\nP = ParamSpec('P')\r\nR = TypeVar('R')\r\n\r\n\r\ndef wrapper(func: Callable[P, R]) -> Callable[P, R]:\r\n return func\r\n\r\n\r\nwrapper(list)([1, 2, 3]) # \"Too many arguments\"\r\n```\r\n\r\n**Expected Behavior**\r\n\r\nmypy should treat `wrapper(list)` exactly the same as `list` in this case.\r\n\r\n**Actual Behavior**\r\n\r\n\"Too many arguments\" is thrown when using the result of `wrapper(list)`\r\n\r\n**Your Environment**\r\n\r\n- Mypy version used: 0.950\r\n- Mypy command-line flags:\r\n- Mypy configuration options from `mypy.ini` (and other config files): follow_imports = silent, ignore_missing_imports = True, strict = True\r\n- Python version used: 3.10.4\r\n- Operating system and version: Debian bullseye\r\n","author":{"url":"https://github.com/markedwards","@type":"Person","name":"markedwards"},"datePublished":"2022-05-22T11:25:14Z","url":"https://github.com/python/mypy/issues/12844"}
| 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:b8488e96-3620-71d8-b67e-e25f76b76842 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C162:5875E:2590168:331EECA:6B003878 |
| html-safe-nonce | 802e3fcb31f6f786c7469aede38edf0491c3d4d876926f22a146f7cdd77ec539 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTYyOjU4NzVFOjI1OTAxNjg6MzMxRUVDQTo2QjAwMzg3OCIsInZpc2l0b3JfaWQiOiIxODE0MTA1NzQ5OTUzOTg0NjMyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4f5f159e9032e55752993c5d3e0d123be7f52ded627d6e09e7c73282f00ee35a |
| hovercard-subject-tag | issue:1244224940 |
| 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/12844/issue_layout |
| twitter:image | https://opengraph.githubassets.com/74b9c5f73000e1bc3712e2077d628d9b114ffd5c5bfd3b0b4cbdd6d8179da1cb/python/mypy/issues/12844 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/74b9c5f73000e1bc3712e2077d628d9b114ffd5c5bfd3b0b4cbdd6d8179da1cb/python/mypy/issues/12844 |
| og:image:alt | Bug Report Passing list to a function which implements ParamSpec results in mypy throwing Too many arguments when trying to use the result. To Reproduce Example: from typing import Callable, TypeVa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | markedwards |
| 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