We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6148c9b commit b8c4beeCopy full SHA for b8c4bee
1 file changed
crates/ty_python_semantic/resources/mdtest/typed_dict.md
@@ -3248,10 +3248,10 @@ def _(extra: Extra, key: str) -> None:
3248
reveal_type(extra["name"]) # revealed: str
3249
# TODO: should be `int` (the extra_items type) with no error
3250
# error: [invalid-key]
3251
- reveal_type(extra["anything"]) # revealed: str
+ reveal_type(extra["anything"]) # revealed: Unknown
3252
# TODO: should be `str | int` with no error
3253
3254
- reveal_type(extra[key]) # revealed: str
+ reveal_type(extra[key]) # revealed: Unknown
3255
```
3256
3257
For closed TypedDicts, indexing into the dictionary with a non-literal `str` is an error, just like
0 commit comments