Skip to content

Commit b8c4bee

Browse files
committed
[ty] Update TypedDict PEP 728 regression expectations
1 parent 6148c9b commit b8c4bee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

crates/ty_python_semantic/resources/mdtest/typed_dict.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3248,10 +3248,10 @@ def _(extra: Extra, key: str) -> None:
32483248
reveal_type(extra["name"]) # revealed: str
32493249
# TODO: should be `int` (the extra_items type) with no error
32503250
# error: [invalid-key]
3251-
reveal_type(extra["anything"]) # revealed: str
3251+
reveal_type(extra["anything"]) # revealed: Unknown
32523252
# TODO: should be `str | int` with no error
32533253
# error: [invalid-key]
3254-
reveal_type(extra[key]) # revealed: str
3254+
reveal_type(extra[key]) # revealed: Unknown
32553255
```
32563256

32573257
For closed TypedDicts, indexing into the dictionary with a non-literal `str` is an error, just like

0 commit comments

Comments
 (0)