Skip to content

Commit

Permalink
Changed return type to Optional
Browse files Browse the repository at this point in the history
  • Loading branch information
yipin-chen committed Jul 1, 2024
1 parent 3798384 commit b731dc1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions python/python/glide/async_commands/cluster_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ async def fcall_ro_route(
function: str,
arguments: Optional[List[str]] = None,
route: Optional[Route] = None,
) -> TClusterResponse[TResult]:
) -> Optional[TClusterResponse[TResult]]:
"""
Invokes a previously loaded read-only function.
Expand All @@ -434,7 +434,7 @@ async def fcall_ro_route(
will route the command to the nodes defined by `route`.
Returns:
TClusterResponse[TResult]: The return value depends on the function that was executed.
Optional[TClusterResponse[TResult]]: The return value depends on the function that was executed.
Examples:
>>> await client.fcall_ro_route("Deep_Thought", ALL_NODES)
Expand All @@ -446,7 +446,7 @@ async def fcall_ro_route(
if arguments is not None:
args.extend(arguments)
return cast(
TClusterResponse[TResult],
Optional[TClusterResponse[TResult]],
await self._execute_command(RequestType.FCallReadOnly, args, route),
)

Expand Down
6 changes: 3 additions & 3 deletions python/python/glide/async_commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5445,7 +5445,7 @@ async def fcall_ro(
function: str,
keys: Optional[List[str]] = None,
arguments: Optional[List[str]] = None,
) -> TResult:
) -> Optional[TResult]:
"""
Invokes a previously loaded read-only function.
Expand All @@ -5462,7 +5462,7 @@ async def fcall_ro(
represent names of keys.
Returns:
TResult: The return value depends on the function that was executed.
Optional[TResult]: The return value depends on the function that was executed.
Examples:
>>> await client.fcall_ro("Deep_Thought", ["key1"], ["Answer", "to", "the",
Expand All @@ -5479,7 +5479,7 @@ async def fcall_ro(
if arguments is not None:
args.extend(arguments)
return cast(
TResult,
Optional[TResult],
await self._execute_command(RequestType.FCallReadOnly, args),
)

Expand Down

0 comments on commit b731dc1

Please sign in to comment.