Skip to content

Commit f0f22db

Browse files
authored
Fixing wrong type hints (redis#3526)
1 parent ac3112d commit f0f22db

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

redis/commands/core.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
GroupT,
3636
KeysT,
3737
KeyT,
38+
Number,
3839
PatternT,
3940
ResponseT,
4041
ScriptTextT,
@@ -2567,7 +2568,7 @@ class ListCommands(CommandsProtocol):
25672568
"""
25682569

25692570
def blpop(
2570-
self, keys: List, timeout: Optional[int] = 0
2571+
self, keys: List, timeout: Optional[Number] = 0
25712572
) -> Union[Awaitable[list], list]:
25722573
"""
25732574
LPOP a value off of the first non-empty list
@@ -2588,7 +2589,7 @@ def blpop(
25882589
return self.execute_command("BLPOP", *keys)
25892590

25902591
def brpop(
2591-
self, keys: List, timeout: Optional[int] = 0
2592+
self, keys: List, timeout: Optional[Number] = 0
25922593
) -> Union[Awaitable[list], list]:
25932594
"""
25942595
RPOP a value off of the first non-empty list
@@ -2609,7 +2610,7 @@ def brpop(
26092610
return self.execute_command("BRPOP", *keys)
26102611

26112612
def brpoplpush(
2612-
self, src: str, dst: str, timeout: Optional[int] = 0
2613+
self, src: str, dst: str, timeout: Optional[Number] = 0
26132614
) -> Union[Awaitable[Optional[str]], Optional[str]]:
26142615
"""
26152616
Pop a value off the tail of ``src``, push it on the head of ``dst``

redis/commands/search/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ def _get_aggregate_result(
586586

587587
def profile(
588588
self,
589-
query: Union[str, Query, AggregateRequest],
589+
query: Union[Query, AggregateRequest],
590590
limited: bool = False,
591591
query_params: Optional[Dict[str, Union[str, int, float]]] = None,
592592
):
@@ -596,7 +596,7 @@ def profile(
596596
597597
### Parameters
598598
599-
**query**: This can be either an `AggregateRequest`, `Query` or string.
599+
**query**: This can be either an `AggregateRequest` or `Query`.
600600
**limited**: If set to True, removes details of reader iterator.
601601
**query_params**: Define one or more value parameters.
602602
Each parameter has a name and a value.

0 commit comments

Comments
 (0)