We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On Python 3.11 and later it seems better to use the native syntax with * instead of Unpack[...] in various messages.
*
Unpack[...]
This is the current behavior:
x: tuple[int, *tuple[int, ...]] # note: Revealed type is "tuple[builtins.int, Unpack[builtins.tuple[builtins.int, ...]]]" reveal_type(x)
I'd expect the note to look like this:
Revealed type is "tuple[builtins.int, *builtins.tuple[builtins.int, ...]]"
The text was updated successfully, but these errors were encountered:
Yeah, we already do this for error messages, see https://github.com/python/mypy/blob/master/mypy/messages.py#L2519-L2520. I just noticed one tricky thing btw: Unpack can be also used for TypedDict unpacking in **kwargs, in that case we need to keep it as Unpack[...].
Unpack
TypedDict
**kwargs
Sorry, something went wrong.
See also python/cpython#104048 and python/typing_extensions#163, where we changed the runtime repr of Unpack to reflect that it could now be used in a PEP-692 context as well as a PEP-646 context
No branches or pull requests
On Python 3.11 and later it seems better to use the native syntax with
*
instead ofUnpack[...]
in various messages.This is the current behavior:
I'd expect the note to look like this:
The text was updated successfully, but these errors were encountered: