Title: Concatenate[str, bool, Q] spuriously duplicated to Concatenate[str, bool, str, bool, Q] · Issue #12734 · python/mypy · GitHub
Open Graph Title: Concatenate[str, bool, Q] spuriously duplicated to Concatenate[str, bool, str, bool, Q] · Issue #12734 · python/mypy
X Title: Concatenate[str, bool, Q] spuriously duplicated to Concatenate[str, bool, str, bool, Q] · Issue #12734 · python/mypy
Description: Mypy gives a false positive on this valid code. The error message seems to indicate that it’s spuriously duplicated the str, bool parameters to str, bool, str, bool somewhere. from typing import Callable, Concatenate, ParamSpec P = Param...
Open Graph Description: Mypy gives a false positive on this valid code. The error message seems to indicate that it’s spuriously duplicated the str, bool parameters to str, bool, str, bool somewhere. from typing import Ca...
X Description: Mypy gives a false positive on this valid code. The error message seems to indicate that it’s spuriously duplicated the str, bool parameters to str, bool, str, bool somewhere. from typing import Ca...
Opengraph URL: https://github.com/python/mypy/issues/12734
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Concatenate[str, bool, Q] spuriously duplicated to Concatenate[str, bool, str, bool, Q]","articleBody":"Mypy gives a false positive on this valid code. The error message seems to indicate that it’s spuriously duplicated the `str, bool` parameters to `str, bool, str, bool` somewhere.\r\n\r\n```python\r\nfrom typing import Callable, Concatenate, ParamSpec\r\n\r\nP = ParamSpec(\"P\")\r\nQ = ParamSpec(\"Q\")\r\n\r\ndef foo(f: Callable[P, int]) -> Callable[P, int]:\r\n return f\r\n\r\ndef bar(f: Callable[Concatenate[str, bool, Q], int]) -> Callable[Concatenate[str, bool, Q], int]:\r\n return foo(f)\r\n```\r\n\r\n[Mypy playground link](https://mypy-play.net/?mypy=latest&python=3.10&gist=8e14aa4bd1b441e495f99f01d95f95bb)\r\n\r\n```\r\nmain.py:10: error: Incompatible return value type (got \"Callable[[str, bool, str, bool, **Q], int]\", expected \"Callable[[str, bool, **Q], int]\")\r\nmain.py:10: error: Argument 1 to \"foo\" has incompatible type \"Callable[[str, bool, **Q], int]\"; expected \"Callable[[str, bool, str, bool, **Q], int]\"\r\nFound 2 errors in 1 file (checked 1 source file)\r\n```\r\n","author":{"url":"https://github.com/andersk","@type":"Person","name":"andersk"},"datePublished":"2022-05-05T21:57:02Z","url":"https://github.com/python/mypy/issues/12734"}
| 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:4467dcee-c410-6580-90f3-872c8fbaa6c7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A15C:23D776:105AE16:1596F02:6B000C27 |
| html-safe-nonce | 591bc5a7e597bb4a87e5a83435b5c172eb865ef5389900f600723a147483bb2b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTVDOjIzRDc3NjoxMDVBRTE2OjE1OTZGMDI6NkIwMDBDMjciLCJ2aXNpdG9yX2lkIjoiNTkyNzYzMTEwMDI2NzQ2NTc2NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4c2dbe79fe4d7489879dfb8dbcba6ad6645598b92a24ac1fdb0698c289287d8b |
| hovercard-subject-tag | issue:1227215063 |
| 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/12734/issue_layout |
| twitter:image | https://opengraph.githubassets.com/59f949d2809545e9b4ddf99c81556da0cd849c166bf072d6cc59fb7f165dbf34/python/mypy/issues/12734 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/59f949d2809545e9b4ddf99c81556da0cd849c166bf072d6cc59fb7f165dbf34/python/mypy/issues/12734 |
| og:image:alt | Mypy gives a false positive on this valid code. The error message seems to indicate that it’s spuriously duplicated the str, bool parameters to str, bool, str, bool somewhere. from typing import Ca... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | andersk |
| 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