Title: "Overloaded ... incompatible return types" error when one overloaded argument is a Tuple · Issue #4237 · python/mypy · GitHub
Open Graph Title: "Overloaded ... incompatible return types" error when one overloaded argument is a Tuple · Issue #4237 · python/mypy
X Title: "Overloaded ... incompatible return types" error when one overloaded argument is a Tuple · Issue #4237 · python/mypy
Description: Running mypy (0.550) on the following code: from typing import overload, Tuple, Any class A: ... class B: ... class C: ... class D: ... @overload def f(x: A) -> B: ... @overload def f(x: Tuple[C]) -> D: ... def f(x: Any) -> Any:... repor...
Open Graph Description: Running mypy (0.550) on the following code: from typing import overload, Tuple, Any class A: ... class B: ... class C: ... class D: ... @overload def f(x: A) -> B: ... @overload def f(x: Tuple[C]) ...
X Description: Running mypy (0.550) on the following code: from typing import overload, Tuple, Any class A: ... class B: ... class C: ... class D: ... @overload def f(x: A) -> B: ... @overload def f(x: Tuple[C...
Opengraph URL: https://github.com/python/mypy/issues/4237
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"Overloaded ... incompatible return types\" error when one overloaded argument is a Tuple","articleBody":"Running mypy (0.550) on the following code:\r\n\r\n```python\r\nfrom typing import overload, Tuple, Any\r\n\r\nclass A: ...\r\nclass B: ...\r\nclass C: ...\r\nclass D: ...\r\n\r\n@overload\r\ndef f(x: A) -> B: ...\r\n\r\n@overload\r\ndef f(x: Tuple[C]) -> D: ...\r\n\r\ndef f(x: Any) -> Any:...\r\n```\r\n\r\nreports:\r\n\r\n`error: Overloaded function signatures 1 and 2 overlap with incompatible return types`\r\n\r\nI've tried a couple different types for the second overload and so far the error only seems to occur with `Tuple[...]` arguments. For instance, I don't see the issue if I substitute `def f(x:List[C]) -> D: ...` as the 2nd overload.","author":{"url":"https://github.com/joshstaiger","@type":"Person","name":"joshstaiger"},"datePublished":"2017-11-12T22:24:24Z","url":"https://github.com/python/mypy/issues/4237"}
| 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:146b8a7b-70e0-d91f-c3c4-790ab53252fe |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B37C:2D8191:AB4E15:E3CC40:6B004825 |
| html-safe-nonce | b62badf62b31252b1bdb862df86d37a84829d412c4c6190cce82d48060bd1068 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzdDOjJEODE5MTpBQjRFMTU6RTNDQzQwOjZCMDA0ODI1IiwidmlzaXRvcl9pZCI6IjgyODMxMjIxNzQ3ODEzMTEwMTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 665f0f6dcc6c1b07dd0eca0c1ae363edde17165823d315e6d13bf3983b3ad1b6 |
| hovercard-subject-tag | issue:273271206 |
| 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/4237/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ea085a7f09bdd60b0046734f2f8a7543a4b5f57160dbe58b666b7976921ec5db/python/mypy/issues/4237 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ea085a7f09bdd60b0046734f2f8a7543a4b5f57160dbe58b666b7976921ec5db/python/mypy/issues/4237 |
| og:image:alt | Running mypy (0.550) on the following code: from typing import overload, Tuple, Any class A: ... class B: ... class C: ... class D: ... @overload def f(x: A) -> B: ... @overload def f(x: Tuple[C]) ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | joshstaiger |
| 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