Skip to content

Fixing wrong type hints #3526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions redis/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
GroupT,
KeysT,
KeyT,
Number,
PatternT,
ResponseT,
ScriptTextT,
Expand Down Expand Up @@ -2567,7 +2568,7 @@ class ListCommands(CommandsProtocol):
"""

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

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

def brpoplpush(
self, src: str, dst: str, timeout: Optional[int] = 0
self, src: str, dst: str, timeout: Optional[Number] = 0
) -> Union[Awaitable[Optional[str]], Optional[str]]:
"""
Pop a value off the tail of ``src``, push it on the head of ``dst``
Expand Down
4 changes: 2 additions & 2 deletions redis/commands/search/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ def _get_aggregate_result(

def profile(
self,
query: Union[str, Query, AggregateRequest],
query: Union[Query, AggregateRequest],
limited: bool = False,
query_params: Optional[Dict[str, Union[str, int, float]]] = None,
):
Expand All @@ -596,7 +596,7 @@ def profile(

### Parameters

**query**: This can be either an `AggregateRequest`, `Query` or string.
**query**: This can be either an `AggregateRequest` or `Query`.
**limited**: If set to True, removes details of reader iterator.
**query_params**: Define one or more value parameters.
Each parameter has a name and a value.
Expand Down
Loading