You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code results in a mypy "INTERNAL ERROR".
classA[*Ts]: ...
A[*tuple[int, ...], *tuple[int, ...]] # no error, fails at runtime:# TypeError: More than one unpacked arbitrary-length tuple argumentb: tuple[*tuple[int, ...], *tuple[int, ...]] # error, as expected
Here's the stack trace for the crash:
version: 1.15.0
Traceback (most recent call last):
File "mypy/checkexpr.py", line 5903, in accept
File "mypy/nodes.py", line 2488, in accept
File "mypy/checkexpr.py", line 4768, in visit_type_application
File "mypy/checkexpr.py", line 4963, in apply_type_arguments_to_callable
File "mypy/checkexpr.py", line 4899, in split_for_callable
File "mypy/typeanal.py", line 2532, in validate_instance
File "mypy/types.py", line 3732, in find_unpack_in_list
AssertionError:
Fixes#18856. This should be done by `TypeAnalyzer.anal_array` but is
not - semanal only invokes its own wrapper around `anal_type`
---------
Co-authored-by: Ivan Levkivskyi <[email protected]>
Fixes#18856. This should be done by `TypeAnalyzer.anal_array` but is
not - semanal only invokes its own wrapper around `anal_type`
---------
Co-authored-by: Ivan Levkivskyi <[email protected]>
The following code results in a mypy "INTERNAL ERROR".
Here's the stack trace for the crash:
I found this when diagnosing a bug reported against pyright.
It may be related to #17755.
The text was updated successfully, but these errors were encountered: