-
Notifications
You must be signed in to change notification settings - Fork 53
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
Python: move the commands return value to bytes #1617
Changes from 33 commits
79b81d7
57cb7ad
21db3a7
c44afff
79bc635
88e90d7
5b87c62
dddee6a
0498d5e
c76d75d
955ea8b
0a44f67
03657f9
490daf3
caec88b
757839a
ee4d9f1
0989f74
e00b929
a837810
11d0ae4
2124914
c05083e
a36e658
4f3f14d
ad415b9
7310846
f86c868
5666344
d8d262a
bd429d0
b18ff66
8ce7aca
2ca5e0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
from __future__ import annotations | ||
|
||
from typing import Dict, List, Mapping, Optional, cast | ||
from typing import Dict, List, Mapping, Optional, Union, cast | ||
|
||
from glide.async_commands.command_args import Limit, OrderBy | ||
from glide.async_commands.core import ( | ||
|
@@ -46,7 +46,7 @@ async def info( | |
self, | ||
sections: Optional[List[InfoSection]] = None, | ||
route: Optional[Route] = None, | ||
) -> TClusterResponse[str]: | ||
) -> TClusterResponse[bytes]: | ||
adarovadya marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why |
||
""" | ||
Get information and statistics about the Redis server. | ||
See https://redis.io/commands/info/ for details. | ||
|
@@ -65,7 +65,7 @@ async def info( | |
args = [section.value for section in sections] if sections else [] | ||
|
||
return cast( | ||
TClusterResponse[str], | ||
TClusterResponse[bytes], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update line 70 please There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 |
||
await self._execute_command(RequestType.Info, args, route), | ||
) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ async def custom_command(self, command_args: List[str]) -> TResult: | |
async def info( | ||
self, | ||
sections: Optional[List[InfoSection]] = None, | ||
) -> str: | ||
) -> bytes: | ||
adarovadya marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update lines 53 and 56. Doesn't |
||
""" | ||
Get information and statistics about the Redis server. | ||
See https://redis.io/commands/info/ for details. | ||
|
@@ -49,10 +49,10 @@ async def info( | |
|
||
|
||
Returns: | ||
str: Returns a string containing the information for the sections requested. | ||
bytes: Returns bytes containing the information for the sections requested. | ||
""" | ||
args = [section.value for section in sections] if sections else [] | ||
return cast(str, await self._execute_command(RequestType.Info, args)) | ||
return cast(bytes, await self._execute_command(RequestType.Info, args)) | ||
|
||
async def exec( | ||
self, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same