Title: Crash with TypeVarTuple feature enabled · Issue #15633 · python/mypy · GitHub
Open Graph Title: Crash with TypeVarTuple feature enabled · Issue #15633 · python/mypy
X Title: Crash with TypeVarTuple feature enabled · Issue #15633 · python/mypy
Description: Mypy crashes with a simple script (valid or not) when using TypeVarTuple feature. Python 3.11.3, Mypy 1.4.1. $ cat ann.py import typing as tp Ts = tp.TypeVarTuple('Ts') def f(x: Ts) -> Ts: return x v = f(1, 2, "A") reveal_type(v) $ mypy ...
Open Graph Description: Mypy crashes with a simple script (valid or not) when using TypeVarTuple feature. Python 3.11.3, Mypy 1.4.1. $ cat ann.py import typing as tp Ts = tp.TypeVarTuple('Ts') def f(x: Ts) -> Ts: return x...
X Description: Mypy crashes with a simple script (valid or not) when using TypeVarTuple feature. Python 3.11.3, Mypy 1.4.1. $ cat ann.py import typing as tp Ts = tp.TypeVarTuple('Ts') def f(x: Ts) -> T...
Opengraph URL: https://github.com/python/mypy/issues/15633
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Crash with TypeVarTuple feature enabled","articleBody":"Mypy crashes with a simple script (valid or not) when using `TypeVarTuple` feature.\r\n\r\nPython 3.11.3, Mypy 1.4.1.\r\n\r\n```\r\n$ cat ann.py\r\nimport typing as tp\r\n\r\nTs = tp.TypeVarTuple('Ts')\r\n\r\ndef f(x: Ts) -> Ts:\r\n return x\r\n\r\nv = f(1, 2, \"A\")\r\nreveal_type(v)\r\n\r\n$ mypy ann.py\r\nann.py:3: error: \"TypeVarTuple\" support is experimental, use --enable-incomplete-feature=TypeVarTuple to enable [misc]\r\nann.py:5: error: Variable \"ann.Ts\" is not valid as a type [valid-type]\r\nann.py:5: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases\r\nann.py:8: error: Too many arguments for \"f\" [call-arg]\r\nann.py:9: note: Revealed type is \"Ts?\"\r\nFound 3 errors in 1 file (checked 1 source file)\r\n\r\n$ mypy --enable-incomplete-feature=TypeVarTuple ann.py\r\nann.py:8: error: INTERNAL ERROR -- Please try using mypy master on GitHub:\r\nhttps://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build\r\nIf this issue continues with mypy master, please report a bug at https://github.com/python/mypy/issues\r\nversion: 1.4.1\r\nann.py:8: : note: please use --show-traceback to print a traceback when reporting a bug\r\n\r\n$ mypy --show-traceback --enable-incomplete-feature=TypeVarTuple ann.py\r\nann.py:8: error: INTERNAL ERROR -- Please try using mypy master on GitHub:\r\nhttps://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build\r\nPlease report a bug at https://github.com/python/mypy/issues\r\nversion: 1.4.1\r\nTraceback (most recent call last):\r\n File \"mypy/checkexpr.py\", line 4961, in accept\r\n File \"mypy/nodes.py\", line 1901, in accept\r\n File \"mypy/checkexpr.py\", line 428, in visit_call_expr\r\n File \"mypy/checkexpr.py\", line 548, in visit_call_expr_inner\r\n File \"mypy/checkexpr.py\", line 1208, in check_call_expr_with_callee_type\r\n File \"mypy/checkexpr.py\", line 1291, in check_call\r\n File \"mypy/checkexpr.py\", line 1431, in check_callable_call\r\n File \"mypy/expandtype.py\", line 136, in freshen_function_type_vars\r\n File \"mypy/expandtype.py\", line 71, in expand_type\r\n File \"mypy/types.py\", line 1917, in accept\r\n File \"mypy/expandtype.py\", line 429, in visit_callable_type\r\n File \"mypy/expandtype.py\", line 536, in expand_types\r\n File \"mypy/types.py\", line 841, in accept\r\n File \"mypy/expandtype.py\", line 274, in visit_type_var_tuple\r\nNotImplementedError:\r\nann.py:8: : note: use --pdb to drop into pdb\r\n```","author":{"url":"https://github.com/wrobell","@type":"Person","name":"wrobell"},"datePublished":"2023-07-10T08:48:18Z","url":"https://github.com/python/mypy/issues/15633"}
| 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:0fb69304-0d8f-7004-f4a8-ae6a35a4bfdf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8ACC:B5253:CD9C80:10BD2A7:6AFFF4A4 |
| html-safe-nonce | ab8ca5c4105ed70656b75386cfb88da9a8b28639017ddce4619c049bbad1d918 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QUNDOkI1MjUzOkNEOUM4MDoxMEJEMkE3OjZBRkZGNEE0IiwidmlzaXRvcl9pZCI6Ijc0NTcwMjEwMzU0MjI5MzgyNzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2bca4fca57fdfc6b9ac68f484c80aa1c75ab06f8a47fa89ed3fda3ce867f20f5 |
| hovercard-subject-tag | issue:1796289390 |
| 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/15633/issue_layout |
| twitter:image | https://opengraph.githubassets.com/38abe48170331da6ecbd6cb2336a7d054309e73d9833f995fee91711012db7d9/python/mypy/issues/15633 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/38abe48170331da6ecbd6cb2336a7d054309e73d9833f995fee91711012db7d9/python/mypy/issues/15633 |
| og:image:alt | Mypy crashes with a simple script (valid or not) when using TypeVarTuple feature. Python 3.11.3, Mypy 1.4.1. $ cat ann.py import typing as tp Ts = tp.TypeVarTuple('Ts') def f(x: Ts) -> Ts: return x... |
| 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 | 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 | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width