Skip to content

Commit

Permalink
misc var improvements (#4068)
Browse files Browse the repository at this point in the history
  • Loading branch information
adhami3310 authored Oct 7, 2024
1 parent 4723019 commit 7cd5c90
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions reflex/vars/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ def entries(self) -> ArrayVar:
"""
return object_entries_operation(self)

items = entries

def merge(self, other: ObjectVar):
"""Merge two objects.
Expand Down
6 changes: 6 additions & 0 deletions reflex/vars/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,12 @@ def __getitem__(
i: int | NumberVar,
) -> ArrayVar[Set[INNER_ARRAY_VAR]]: ...

@overload
def __getitem__(
self: ARRAY_VAR_OF_LIST_ELEMENT[Tuple[KEY_TYPE, VALUE_TYPE]],
i: int | NumberVar,
) -> ArrayVar[Tuple[KEY_TYPE, VALUE_TYPE]]: ...

@overload
def __getitem__(
self: ARRAY_VAR_OF_LIST_ELEMENT[Tuple[INNER_ARRAY_VAR, ...]],
Expand Down

0 comments on commit 7cd5c90

Please sign in to comment.