Skip to content

Commit 9b2d93e

Browse files
authored
type hint: handle generic sequence in Var.to (#5705)
1 parent 82d24b7 commit 9b2d93e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

reflex/vars/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ def __format__(self, format_spec: str) -> str:
717717
return f"{constants.REFLEX_VAR_OPENING_TAG}{hashed_var}{constants.REFLEX_VAR_CLOSING_TAG}{self._js_expr}"
718718

719719
@overload
720-
def to(self, output: type[str]) -> StringVar: ...
720+
def to(self, output: type[str]) -> StringVar: ... # pyright: ignore[reportOverlappingOverload]
721721

722722
@overload
723723
def to(self, output: type[bool]) -> BooleanVar: ...
@@ -734,8 +734,8 @@ def to(self, output: type[Decimal]) -> NumberVar[Decimal]: ...
734734
@overload
735735
def to(
736736
self,
737-
output: type[list] | type[tuple] | type[set],
738-
) -> ArrayVar: ...
737+
output: type[SEQUENCE_TYPE],
738+
) -> ArrayVar[SEQUENCE_TYPE]: ...
739739

740740
@overload
741741
def to(

0 commit comments

Comments
 (0)