Skip to content

Commit 7e81ef8

Browse files
committed
core: fixes for type hints in GeoCommands
Issues were found by the tests type checking Signed-off-by: Mikhail Koviazin <github@mkmk.aleeas.com>
1 parent 16e9ec2 commit 7e81ef8

1 file changed

Lines changed: 40 additions & 32 deletions

File tree

valkey/commands/core.py

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10573,14 +10573,15 @@ def georadius(
1057310573
withhash: bool = False,
1057410574
count: int | None = None,
1057510575
sort: str | None = None,
10576-
store: KeyT = ...,
10576+
*,
10577+
store: KeyT,
1057710578
store_dist: None = None,
1057810579
any: bool = False,
1057910580
) -> int: ...
1058010581

1058110582
@overload
1058210583
def georadius(
10583-
self: AsyncClientProtocol,
10584+
self: SyncClientProtocol,
1058410585
name: KeyT,
1058510586
longitude: float,
1058610587
latitude: float,
@@ -10591,10 +10592,11 @@ def georadius(
1059110592
withhash: bool = False,
1059210593
count: int | None = None,
1059310594
sort: str | None = None,
10594-
store: KeyT = ...,
10595-
store_dist: None = None,
10595+
store: None = None,
10596+
*,
10597+
store_dist: KeyT,
1059610598
any: bool = False,
10597-
) -> Awaitable[int]: ...
10599+
) -> int: ...
1059810600

1059910601
@overload
1060010602
def georadius(
@@ -10610,9 +10612,9 @@ def georadius(
1061010612
count: int | None = None,
1061110613
sort: str | None = None,
1061210614
store: None = None,
10613-
store_dist: KeyT = ...,
10615+
store_dist: None = None,
1061410616
any: bool = False,
10615-
) -> int: ...
10617+
) -> GeoSearchReplyT: ...
1061610618

1061710619
@overload
1061810620
def georadius(
@@ -10627,14 +10629,15 @@ def georadius(
1062710629
withhash: bool = False,
1062810630
count: int | None = None,
1062910631
sort: str | None = None,
10630-
store: None = None,
10631-
store_dist: KeyT = ...,
10632+
*,
10633+
store: KeyT,
10634+
store_dist: None = None,
1063210635
any: bool = False,
1063310636
) -> Awaitable[int]: ...
1063410637

1063510638
@overload
1063610639
def georadius(
10637-
self: SyncClientProtocol,
10640+
self: AsyncClientProtocol,
1063810641
name: KeyT,
1063910642
longitude: float,
1064010643
latitude: float,
@@ -10645,10 +10648,11 @@ def georadius(
1064510648
withhash: bool = False,
1064610649
count: int | None = None,
1064710650
sort: str | None = None,
10648-
store: KeyT | None = None,
10649-
store_dist: KeyT | None = None,
10651+
store: None = None,
10652+
*,
10653+
store_dist: KeyT,
1065010654
any: bool = False,
10651-
) -> GeoSearchReplyT | int: ...
10655+
) -> Awaitable[int]: ...
1065210656

1065310657
@overload
1065410658
def georadius(
@@ -10663,10 +10667,10 @@ def georadius(
1066310667
withhash: bool = False,
1066410668
count: int | None = None,
1066510669
sort: str | None = None,
10666-
store: KeyT | None = None,
10667-
store_dist: KeyT | None = None,
10670+
store: None = None,
10671+
store_dist: None = None,
1066810672
any: bool = False,
10669-
) -> Awaitable[GeoSearchReplyT | int]: ...
10673+
) -> Awaitable[GeoSearchReplyT]: ...
1067010674

1067110675
def georadius(
1067210676
self,
@@ -10743,14 +10747,15 @@ def georadiusbymember(
1074310747
withhash: bool = False,
1074410748
count: int | None = None,
1074510749
sort: str | None = None,
10746-
store: KeyT = ...,
10750+
*,
10751+
store: KeyT,
1074710752
store_dist: None = None,
1074810753
any: bool = False,
1074910754
) -> int: ...
1075010755

1075110756
@overload
1075210757
def georadiusbymember(
10753-
self: AsyncClientProtocol,
10758+
self: SyncClientProtocol,
1075410759
name: KeyT,
1075510760
member: FieldT,
1075610761
radius: float,
@@ -10760,10 +10765,11 @@ def georadiusbymember(
1076010765
withhash: bool = False,
1076110766
count: int | None = None,
1076210767
sort: str | None = None,
10763-
store: KeyT = ...,
10764-
store_dist: None = None,
10768+
store: None = None,
10769+
*,
10770+
store_dist: KeyT,
1076510771
any: bool = False,
10766-
) -> Awaitable[int]: ...
10772+
) -> int: ...
1076710773

1076810774
@overload
1076910775
def georadiusbymember(
@@ -10778,9 +10784,9 @@ def georadiusbymember(
1077810784
count: int | None = None,
1077910785
sort: str | None = None,
1078010786
store: None = None,
10781-
store_dist: KeyT = ...,
10787+
store_dist: None = None,
1078210788
any: bool = False,
10783-
) -> int: ...
10789+
) -> GeoSearchReplyT: ...
1078410790

1078510791
@overload
1078610792
def georadiusbymember(
@@ -10794,14 +10800,15 @@ def georadiusbymember(
1079410800
withhash: bool = False,
1079510801
count: int | None = None,
1079610802
sort: str | None = None,
10797-
store: None = None,
10798-
store_dist: KeyT = ...,
10803+
*,
10804+
store: KeyT,
10805+
store_dist: None = None,
1079910806
any: bool = False,
1080010807
) -> Awaitable[int]: ...
1080110808

1080210809
@overload
1080310810
def georadiusbymember(
10804-
self: SyncClientProtocol,
10811+
self: AsyncClientProtocol,
1080510812
name: KeyT,
1080610813
member: FieldT,
1080710814
radius: float,
@@ -10811,10 +10818,11 @@ def georadiusbymember(
1081110818
withhash: bool = False,
1081210819
count: int | None = None,
1081310820
sort: str | None = None,
10814-
store: KeyT | None = None,
10815-
store_dist: KeyT | None = None,
10821+
store: None = None,
10822+
*,
10823+
store_dist: KeyT,
1081610824
any: bool = False,
10817-
) -> GeoSearchReplyT | int: ...
10825+
) -> Awaitable[int]: ...
1081810826

1081910827
@overload
1082010828
def georadiusbymember(
@@ -10828,10 +10836,10 @@ def georadiusbymember(
1082810836
withhash: bool = False,
1082910837
count: int | None = None,
1083010838
sort: str | None = None,
10831-
store: KeyT | None = None,
10832-
store_dist: KeyT | None = None,
10839+
store: None = None,
10840+
store_dist: None = None,
1083310841
any: bool = False,
10834-
) -> Awaitable[GeoSearchReplyT | int]: ...
10842+
) -> Awaitable[GeoSearchReplyT]: ...
1083510843

1083610844
def georadiusbymember(
1083710845
self,

0 commit comments

Comments
 (0)