ruff
ae613c5a - [ty] Support `**` unpacking of `TypedDict` in dict-literal assignments (#24703)

Commit
170 days ago
[ty] Support `**` unpacking of `TypedDict` in dict-literal assignments (#24703) ## Summary We already support `**` unpacking of `TypedDict` in named `TypedDict` constructors; this PR extends it to literals annotated as `TypedDict`, as in: ```python from typing import TypedDict class MyTypedDict1(TypedDict): aaa: int bbb: int class MyTypedDict2(TypedDict): aaa: int bbb: int ccc: int d1: MyTypedDict1 = { "aaa": 1, "bbb": 2, } d2: MyTypedDict2 = { **d1, "ccc": 3, } ``` Closes https://github.com/astral-sh/ty/issues/1493
Author
Parents
Loading