Skip to content

Commit 7e9f928

Browse files
authored
add overload for typeddict mapping since their value type is any (#4949)
1 parent debc5bb commit 7e9f928

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

reflex/vars/object.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,12 @@ def __getitem__(
202202
key: Var | Any,
203203
) -> ObjectVar[Mapping[OTHER_KEY_TYPE, VALUE_TYPE]]: ...
204204

205+
@overload
206+
def __getitem__(
207+
self: ObjectVar[Mapping[Any, VALUE_TYPE]],
208+
key: Var | Any,
209+
) -> Var[VALUE_TYPE]: ...
210+
205211
def __getitem__(self, key: Var | Any) -> Var:
206212
"""Get an item from the object.
207213

0 commit comments

Comments
 (0)