@@ -92,7 +92,7 @@ def acl_deluser(self, *username: str, **kwargs) -> ResponseT:
92
92
"""
93
93
return self .execute_command ("ACL DELUSER" , * username , ** kwargs )
94
94
95
- def acl_genpass (self , bits : Optional [None ] = None , ** kwargs ) -> ResponseT :
95
+ def acl_genpass (self , bits : Optional [int ] = None , ** kwargs ) -> ResponseT :
96
96
"""Generate a random password value.
97
97
If ``bits`` is supplied then use this number of bits, rounded to
98
98
the next multiple of 4.
@@ -1304,7 +1304,7 @@ def slaveof(
1304
1304
return self .execute_command ("SLAVEOF" , b"NO" , b"ONE" , ** kwargs )
1305
1305
return self .execute_command ("SLAVEOF" , host , port , ** kwargs )
1306
1306
1307
- def slowlog_get (self , num : Optional [None ] = None , ** kwargs ) -> ResponseT :
1307
+ def slowlog_get (self , num : Optional [int ] = None , ** kwargs ) -> ResponseT :
1308
1308
"""
1309
1309
Get the entries from the slowlog. If ``num`` is specified, get the
1310
1310
most recent ``num`` items.
@@ -1572,8 +1572,8 @@ def append(self, key: KeyT, value: EncodableT) -> ResponseT:
1572
1572
def bitcount (
1573
1573
self ,
1574
1574
key : KeyT ,
1575
- start : Optional [None ] = None ,
1576
- end : Optional [None ] = None ,
1575
+ start : Optional [int ] = None ,
1576
+ end : Optional [int ] = None ,
1577
1577
mode : Optional [str ] = None ,
1578
1578
) -> ResponseT :
1579
1579
"""
@@ -1641,8 +1641,8 @@ def bitpos(
1641
1641
self ,
1642
1642
key : KeyT ,
1643
1643
bit : int ,
1644
- start : Optional [None ] = None ,
1645
- end : Optional [None ] = None ,
1644
+ start : Optional [int ] = None ,
1645
+ end : Optional [int ] = None ,
1646
1646
mode : Optional [str ] = None ,
1647
1647
) -> ResponseT :
1648
1648
"""
@@ -2191,8 +2191,8 @@ def restore(
2191
2191
value : EncodableT ,
2192
2192
replace : bool = False ,
2193
2193
absttl : bool = False ,
2194
- idletime : Optional [None ] = None ,
2195
- frequency : Optional [None ] = None ,
2194
+ idletime : Optional [int ] = None ,
2195
+ frequency : Optional [int ] = None ,
2196
2196
) -> ResponseT :
2197
2197
"""
2198
2198
Create a key using the provided serialized value, previously obtained
@@ -2360,7 +2360,7 @@ def stralgo(
2360
2360
specific_argument : Union [Literal ["strings" ], Literal ["keys" ]] = "strings" ,
2361
2361
len : bool = False ,
2362
2362
idx : bool = False ,
2363
- minmatchlen : Optional [None ] = None ,
2363
+ minmatchlen : Optional [int ] = None ,
2364
2364
withmatchlen : bool = False ,
2365
2365
** kwargs ,
2366
2366
) -> ResponseT :
@@ -2960,7 +2960,7 @@ def scan(
2960
2960
self ,
2961
2961
cursor : int = 0 ,
2962
2962
match : Union [PatternT , None ] = None ,
2963
- count : Optional [None ] = None ,
2963
+ count : Optional [int ] = None ,
2964
2964
_type : Optional [str ] = None ,
2965
2965
** kwargs ,
2966
2966
) -> ResponseT :
@@ -2992,7 +2992,7 @@ def scan(
2992
2992
def scan_iter (
2993
2993
self ,
2994
2994
match : Union [PatternT , None ] = None ,
2995
- count : Optional [None ] = None ,
2995
+ count : Optional [int ] = None ,
2996
2996
_type : Optional [str ] = None ,
2997
2997
** kwargs ,
2998
2998
) -> Iterator :
@@ -3022,7 +3022,7 @@ def sscan(
3022
3022
name : KeyT ,
3023
3023
cursor : int = 0 ,
3024
3024
match : Union [PatternT , None ] = None ,
3025
- count : Optional [None ] = None ,
3025
+ count : Optional [int ] = None ,
3026
3026
) -> ResponseT :
3027
3027
"""
3028
3028
Incrementally return lists of elements in a set. Also return a cursor
@@ -3045,7 +3045,7 @@ def sscan_iter(
3045
3045
self ,
3046
3046
name : KeyT ,
3047
3047
match : Union [PatternT , None ] = None ,
3048
- count : Optional [None ] = None ,
3048
+ count : Optional [int ] = None ,
3049
3049
) -> Iterator :
3050
3050
"""
3051
3051
Make an iterator using the SSCAN command so that the client doesn't
@@ -3065,7 +3065,7 @@ def hscan(
3065
3065
name : KeyT ,
3066
3066
cursor : int = 0 ,
3067
3067
match : Union [PatternT , None ] = None ,
3068
- count : Optional [None ] = None ,
3068
+ count : Optional [int ] = None ,
3069
3069
no_values : Union [bool , None ] = None ,
3070
3070
) -> ResponseT :
3071
3071
"""
@@ -3093,7 +3093,7 @@ def hscan_iter(
3093
3093
self ,
3094
3094
name : str ,
3095
3095
match : Union [PatternT , None ] = None ,
3096
- count : Optional [None ] = None ,
3096
+ count : Optional [int ] = None ,
3097
3097
no_values : Union [bool , None ] = None ,
3098
3098
) -> Iterator :
3099
3099
"""
@@ -3121,7 +3121,7 @@ def zscan(
3121
3121
name : KeyT ,
3122
3122
cursor : int = 0 ,
3123
3123
match : Union [PatternT , None ] = None ,
3124
- count : Optional [None ] = None ,
3124
+ count : Optional [int ] = None ,
3125
3125
score_cast_func : Union [type , Callable ] = float ,
3126
3126
) -> ResponseT :
3127
3127
"""
@@ -3148,7 +3148,7 @@ def zscan_iter(
3148
3148
self ,
3149
3149
name : KeyT ,
3150
3150
match : Union [PatternT , None ] = None ,
3151
- count : Optional [None ] = None ,
3151
+ count : Optional [int ] = None ,
3152
3152
score_cast_func : Union [type , Callable ] = float ,
3153
3153
) -> Iterator :
3154
3154
"""
@@ -3177,7 +3177,7 @@ class AsyncScanCommands(ScanCommands):
3177
3177
async def scan_iter (
3178
3178
self ,
3179
3179
match : Union [PatternT , None ] = None ,
3180
- count : Optional [None ] = None ,
3180
+ count : Optional [int ] = None ,
3181
3181
_type : Optional [str ] = None ,
3182
3182
** kwargs ,
3183
3183
) -> AsyncIterator :
@@ -3207,7 +3207,7 @@ async def sscan_iter(
3207
3207
self ,
3208
3208
name : KeyT ,
3209
3209
match : Union [PatternT , None ] = None ,
3210
- count : Optional [None ] = None ,
3210
+ count : Optional [int ] = None ,
3211
3211
) -> AsyncIterator :
3212
3212
"""
3213
3213
Make an iterator using the SSCAN command so that the client doesn't
@@ -3229,7 +3229,7 @@ async def hscan_iter(
3229
3229
self ,
3230
3230
name : str ,
3231
3231
match : Union [PatternT , None ] = None ,
3232
- count : Optional [None ] = None ,
3232
+ count : Optional [int ] = None ,
3233
3233
no_values : Union [bool , None ] = None ,
3234
3234
) -> AsyncIterator :
3235
3235
"""
@@ -3258,7 +3258,7 @@ async def zscan_iter(
3258
3258
self ,
3259
3259
name : KeyT ,
3260
3260
match : Union [PatternT , None ] = None ,
3261
- count : Optional [None ] = None ,
3261
+ count : Optional [int ] = None ,
3262
3262
score_cast_func : Union [type , Callable ] = float ,
3263
3263
) -> AsyncIterator :
3264
3264
"""
@@ -3489,11 +3489,11 @@ def xadd(
3489
3489
name : KeyT ,
3490
3490
fields : Dict [FieldT , EncodableT ],
3491
3491
id : StreamIdT = "*" ,
3492
- maxlen : Optional [None ] = None ,
3492
+ maxlen : Optional [int ] = None ,
3493
3493
approximate : bool = True ,
3494
3494
nomkstream : bool = False ,
3495
3495
minid : Union [StreamIdT , None ] = None ,
3496
- limit : Optional [None ] = None ,
3496
+ limit : Optional [int ] = None ,
3497
3497
) -> ResponseT :
3498
3498
"""
3499
3499
Add to a stream.
@@ -3544,7 +3544,7 @@ def xautoclaim(
3544
3544
consumername : ConsumerT ,
3545
3545
min_idle_time : int ,
3546
3546
start_id : StreamIdT = "0-0" ,
3547
- count : Optional [None ] = None ,
3547
+ count : Optional [int ] = None ,
3548
3548
justid : bool = False ,
3549
3549
) -> ResponseT :
3550
3550
"""
@@ -3595,9 +3595,9 @@ def xclaim(
3595
3595
consumername : ConsumerT ,
3596
3596
min_idle_time : int ,
3597
3597
message_ids : Union [List [StreamIdT ], Tuple [StreamIdT ]],
3598
- idle : Optional [None ] = None ,
3599
- time : Optional [None ] = None ,
3600
- retrycount : Optional [None ] = None ,
3598
+ idle : Optional [int ] = None ,
3599
+ time : Optional [int ] = None ,
3600
+ retrycount : Optional [int ] = None ,
3601
3601
force : bool = False ,
3602
3602
justid : bool = False ,
3603
3603
) -> ResponseT :
@@ -3829,7 +3829,7 @@ def xpending_range(
3829
3829
max : StreamIdT ,
3830
3830
count : int ,
3831
3831
consumername : Union [ConsumerT , None ] = None ,
3832
- idle : Optional [None ] = None ,
3832
+ idle : Optional [int ] = None ,
3833
3833
) -> ResponseT :
3834
3834
"""
3835
3835
Returns information about pending messages, in a range.
@@ -3883,7 +3883,7 @@ def xrange(
3883
3883
name : KeyT ,
3884
3884
min : StreamIdT = "-" ,
3885
3885
max : StreamIdT = "+" ,
3886
- count : Optional [None ] = None ,
3886
+ count : Optional [int ] = None ,
3887
3887
) -> ResponseT :
3888
3888
"""
3889
3889
Read stream values within an interval.
@@ -3913,8 +3913,8 @@ def xrange(
3913
3913
def xread (
3914
3914
self ,
3915
3915
streams : Dict [KeyT , StreamIdT ],
3916
- count : Optional [None ] = None ,
3917
- block : Optional [None ] = None ,
3916
+ count : Optional [int ] = None ,
3917
+ block : Optional [int ] = None ,
3918
3918
) -> ResponseT :
3919
3919
"""
3920
3920
Block and monitor multiple streams for new data.
@@ -3953,8 +3953,8 @@ def xreadgroup(
3953
3953
groupname : str ,
3954
3954
consumername : str ,
3955
3955
streams : Dict [KeyT , StreamIdT ],
3956
- count : Optional [None ] = None ,
3957
- block : Optional [None ] = None ,
3956
+ count : Optional [int ] = None ,
3957
+ block : Optional [int ] = None ,
3958
3958
noack : bool = False ,
3959
3959
) -> ResponseT :
3960
3960
"""
@@ -4000,7 +4000,7 @@ def xrevrange(
4000
4000
name : KeyT ,
4001
4001
max : StreamIdT = "+" ,
4002
4002
min : StreamIdT = "-" ,
4003
- count : Optional [None ] = None ,
4003
+ count : Optional [int ] = None ,
4004
4004
) -> ResponseT :
4005
4005
"""
4006
4006
Read stream values within an interval, in reverse order.
@@ -4030,10 +4030,10 @@ def xrevrange(
4030
4030
def xtrim (
4031
4031
self ,
4032
4032
name : KeyT ,
4033
- maxlen : Optional [None ] = None ,
4033
+ maxlen : Optional [int ] = None ,
4034
4034
approximate : bool = True ,
4035
4035
minid : Union [StreamIdT , None ] = None ,
4036
- limit : Optional [None ] = None ,
4036
+ limit : Optional [int ] = None ,
4037
4037
) -> ResponseT :
4038
4038
"""
4039
4039
Trims old messages from a stream.
@@ -4263,7 +4263,7 @@ def zlexcount(self, name, min, max):
4263
4263
"""
4264
4264
return self .execute_command ("ZLEXCOUNT" , name , min , max , keys = [name ])
4265
4265
4266
- def zpopmax (self , name : KeyT , count : Optional [None ] = None ) -> ResponseT :
4266
+ def zpopmax (self , name : KeyT , count : Optional [int ] = None ) -> ResponseT :
4267
4267
"""
4268
4268
Remove and return up to ``count`` members with the highest scores
4269
4269
from the sorted set ``name``.
@@ -4274,7 +4274,7 @@ def zpopmax(self, name: KeyT, count: Optional[None] = None) -> ResponseT:
4274
4274
options = {"withscores" : True }
4275
4275
return self .execute_command ("ZPOPMAX" , name , * args , ** options )
4276
4276
4277
- def zpopmin (self , name : KeyT , count : Optional [None ] = None ) -> ResponseT :
4277
+ def zpopmin (self , name : KeyT , count : Optional [int ] = None ) -> ResponseT :
4278
4278
"""
4279
4279
Remove and return up to ``count`` members with the lowest scores
4280
4280
from the sorted set ``name``.
@@ -4418,8 +4418,8 @@ def _zrange(
4418
4418
bylex : bool = False ,
4419
4419
withscores : bool = False ,
4420
4420
score_cast_func : Union [type , Callable , None ] = float ,
4421
- offset : Optional [None ] = None ,
4422
- num : Optional [None ] = None ,
4421
+ offset : Optional [int ] = None ,
4422
+ num : Optional [int ] = None ,
4423
4423
) -> ResponseT :
4424
4424
if byscore and bylex :
4425
4425
raise DataError ("``byscore`` and ``bylex`` can not be specified together." )
@@ -4545,8 +4545,8 @@ def zrangestore(
4545
4545
byscore : bool = False ,
4546
4546
bylex : bool = False ,
4547
4547
desc : bool = False ,
4548
- offset : Optional [None ] = None ,
4549
- num : Optional [None ] = None ,
4548
+ offset : Optional [int ] = None ,
4549
+ num : Optional [int ] = None ,
4550
4550
) -> ResponseT :
4551
4551
"""
4552
4552
Stores in ``dest`` the result of a range of values from sorted set
@@ -4591,8 +4591,8 @@ def zrangebylex(
4591
4591
name : KeyT ,
4592
4592
min : EncodableT ,
4593
4593
max : EncodableT ,
4594
- start : Optional [None ] = None ,
4595
- num : Optional [None ] = None ,
4594
+ start : Optional [int ] = None ,
4595
+ num : Optional [int ] = None ,
4596
4596
) -> ResponseT :
4597
4597
"""
4598
4598
Return the lexicographical range of values from sorted set ``name``
@@ -4615,8 +4615,8 @@ def zrevrangebylex(
4615
4615
name : KeyT ,
4616
4616
max : EncodableT ,
4617
4617
min : EncodableT ,
4618
- start : Optional [None ] = None ,
4619
- num : Optional [None ] = None ,
4618
+ start : Optional [int ] = None ,
4619
+ num : Optional [int ] = None ,
4620
4620
) -> ResponseT :
4621
4621
"""
4622
4622
Return the reversed lexicographical range of values from sorted set
@@ -4639,8 +4639,8 @@ def zrangebyscore(
4639
4639
name : KeyT ,
4640
4640
min : ZScoreBoundT ,
4641
4641
max : ZScoreBoundT ,
4642
- start : Optional [None ] = None ,
4643
- num : Optional [None ] = None ,
4642
+ start : Optional [int ] = None ,
4643
+ num : Optional [int ] = None ,
4644
4644
withscores : bool = False ,
4645
4645
score_cast_func : Union [type , Callable ] = float ,
4646
4646
) -> ResponseT :
@@ -4674,8 +4674,8 @@ def zrevrangebyscore(
4674
4674
name : KeyT ,
4675
4675
max : ZScoreBoundT ,
4676
4676
min : ZScoreBoundT ,
4677
- start : Optional [None ] = None ,
4678
- num : Optional [None ] = None ,
4677
+ start : Optional [int ] = None ,
4678
+ num : Optional [int ] = None ,
4679
4679
withscores : bool = False ,
4680
4680
score_cast_func : Union [type , Callable ] = float ,
4681
4681
):
@@ -6040,7 +6040,7 @@ def georadius(
6040
6040
withdist : bool = False ,
6041
6041
withcoord : bool = False ,
6042
6042
withhash : bool = False ,
6043
- count : Optional [None ] = None ,
6043
+ count : Optional [int ] = None ,
6044
6044
sort : Optional [str ] = None ,
6045
6045
store : Optional [KeyT ] = None ,
6046
6046
store_dist : Optional [KeyT ] = None ,
@@ -6102,7 +6102,7 @@ def georadiusbymember(
6102
6102
withdist : bool = False ,
6103
6103
withcoord : bool = False ,
6104
6104
withhash : bool = False ,
6105
- count : Optional [None ] = None ,
6105
+ count : Optional [int ] = None ,
6106
6106
sort : Optional [str ] = None ,
6107
6107
store : Union [KeyT , None ] = None ,
6108
6108
store_dist : Union [KeyT , None ] = None ,
@@ -6189,7 +6189,7 @@ def geosearch(
6189
6189
width : Union [float , None ] = None ,
6190
6190
height : Union [float , None ] = None ,
6191
6191
sort : Optional [str ] = None ,
6192
- count : Optional [None ] = None ,
6192
+ count : Optional [int ] = None ,
6193
6193
any : bool = False ,
6194
6194
withcoord : bool = False ,
6195
6195
withdist : bool = False ,
0 commit comments