@@ -635,20 +635,43 @@ class ScanCommands(Generic[_StrType]):
635
635
def hscan_iter (
636
636
self , name : _Key , match : _Key | None = ..., count : int | None = ...
637
637
) -> Iterator [tuple [_StrType , _StrType ]]: ...
638
+ @overload
639
+ def zscan (
640
+ self , name : _Key , cursor : int = ..., match : _Key | None = ..., count : int | None = ...
641
+ ) -> tuple [int , list [tuple [_StrType , float ]]]: ...
642
+ @overload
638
643
def zscan (
639
644
self ,
640
645
name : _Key ,
641
646
cursor : int = ...,
642
647
match : _Key | None = ...,
643
648
count : int | None = ...,
644
- score_cast_func : Callable [[_StrType ], _ScoreCastFuncReturn ] = ...,
649
+ * ,
650
+ score_cast_func : Callable [[_StrType ], _ScoreCastFuncReturn ],
645
651
) -> tuple [int , list [tuple [_StrType , _ScoreCastFuncReturn ]]]: ...
652
+ @overload
653
+ def zscan (
654
+ self ,
655
+ name : _Key ,
656
+ cursor : int ,
657
+ match : _Key | None ,
658
+ count : int | None ,
659
+ score_cast_func : Callable [[_StrType ], _ScoreCastFuncReturn ],
660
+ ) -> tuple [int , list [tuple [_StrType , _ScoreCastFuncReturn ]]]: ...
661
+ @overload
662
+ def zscan_iter (self , name : _Key , match : _Key | None = ..., count : int | None = ...) -> Iterator [tuple [_StrType , float ]]: ...
663
+ @overload
646
664
def zscan_iter (
647
665
self ,
648
666
name : _Key ,
649
667
match : _Key | None = ...,
650
668
count : int | None = ...,
651
- score_cast_func : Callable [[_StrType ], _ScoreCastFuncReturn ] = ...,
669
+ * ,
670
+ score_cast_func : Callable [[_StrType ], _ScoreCastFuncReturn ],
671
+ ) -> Iterator [tuple [_StrType , _ScoreCastFuncReturn ]]: ...
672
+ @overload
673
+ def zscan_iter (
674
+ self , name : _Key , match : _Key | None , count : int | None , score_cast_func : Callable [[_StrType ], _ScoreCastFuncReturn ]
652
675
) -> Iterator [tuple [_StrType , _ScoreCastFuncReturn ]]: ...
653
676
654
677
class AsyncScanCommands (Generic [_StrType ]):
@@ -673,20 +696,45 @@ class AsyncScanCommands(Generic[_StrType]):
673
696
def hscan_iter (
674
697
self , name : _Key , match : _Key | None = ..., count : int | None = ...
675
698
) -> AsyncIterator [tuple [_StrType , _StrType ]]: ...
699
+ @overload
700
+ async def zscan (
701
+ self , name : _Key , cursor : int = ..., match : _Key | None = ..., count : int | None = ...
702
+ ) -> tuple [int , list [tuple [_StrType , float ]]]: ...
703
+ @overload
676
704
async def zscan (
677
705
self ,
678
706
name : _Key ,
679
707
cursor : int = ...,
680
708
match : _Key | None = ...,
681
709
count : int | None = ...,
682
- score_cast_func : Callable [[_StrType ], _ScoreCastFuncReturn ] = ...,
710
+ * ,
711
+ score_cast_func : Callable [[_StrType ], _ScoreCastFuncReturn ],
712
+ ) -> tuple [int , list [tuple [_StrType , _ScoreCastFuncReturn ]]]: ...
713
+ @overload
714
+ async def zscan (
715
+ self ,
716
+ name : _Key ,
717
+ cursor : int ,
718
+ match : _Key | None ,
719
+ count : int | None ,
720
+ score_cast_func : Callable [[_StrType ], _ScoreCastFuncReturn ],
683
721
) -> tuple [int , list [tuple [_StrType , _ScoreCastFuncReturn ]]]: ...
722
+ @overload
723
+ def zscan_iter (
724
+ self , name : _Key , match : _Key | None = ..., count : int | None = ...
725
+ ) -> AsyncIterator [tuple [_StrType , float ]]: ...
726
+ @overload
684
727
def zscan_iter (
685
728
self ,
686
729
name : _Key ,
687
730
match : _Key | None = ...,
688
731
count : int | None = ...,
689
- score_cast_func : Callable [[_StrType ], _ScoreCastFuncReturn ] = ...,
732
+ * ,
733
+ score_cast_func : Callable [[_StrType ], _ScoreCastFuncReturn ],
734
+ ) -> AsyncIterator [tuple [_StrType , _ScoreCastFuncReturn ]]: ...
735
+ @overload
736
+ def zscan_iter (
737
+ self , name : _Key , match : _Key | None , count : int | None , score_cast_func : Callable [[_StrType ], _ScoreCastFuncReturn ]
690
738
) -> AsyncIterator [tuple [_StrType , _ScoreCastFuncReturn ]]: ...
691
739
692
740
class SetCommands (Generic [_StrType ]):
0 commit comments