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
Change the formatting to be closer to the TypedDict definition syntax
and preserve TypedDict name when constructing using TD(...) for better
reveal_type output.
Note that this uses a new representation `'key'?: type` for
non-required keys.
I'll update remaining error messages to use the new syntax in a
separate PR.
Fixes#3590.
Change the formatting to be closer to the TypedDict definition syntax
and preserve TypedDict name when constructing using TD(...) for better
reveal_type output.
Note that this uses a new representation `'key'?: type` for
non-required keys.
Fixes#3590.
reveal_type()
used with a TypedDict generates a long output that is quite different from the current syntax for defining a TypedDict. Example:Not sure what's the best course action. Some ideas:
Mapping
, since it's at least mostly redundant.{'x': builtins.int, ...}
instead ofx=builtins.int, ...
.TypedDict('Name', x=int, ...)
for defining a TypedDict, so that the supported syntax is closer toreveal_type
.The text was updated successfully, but these errors were encountered: