Skip to content

Commit

Permalink
Suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
kristjanvalur committed May 3, 2023
1 parent 9beb1cf commit df6ecb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion redis/asyncio/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,8 @@ async def can_read_destructive(self):
async def read_response(
self,
disable_decoding: bool = False,
*,
timeout: Optional[float] = None,
*,
disconnect_on_error: bool = True,
):
"""Read the response from a previously sent command"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_asyncio/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
skip_unless_arch_bits,
)

if sys.version_info.major >= 3 and sys.version_info.minor >= 11:
if sys.version_info >= (3, 11, 3):
from asyncio import timeout as async_timeout
else:
from async_timeout import timeout as async_timeout
Expand Down Expand Up @@ -3032,7 +3032,7 @@ async def helper():
# If the following is not done, further Timout operations will fail,
# because the timeout won't catch its Cancelled Error if the task
# has a pending cancel. Python documentation probably should reflect this.
if sys.version_info.major >= 3 and sys.version_info.minor >= 11:
if sys.version_info >= (3, 11):
asyncio.current_task().uncancel()
# if all is well, we can continue. The following should not hang.
await r.set("status", "down")
Expand Down

0 comments on commit df6ecb1

Please sign in to comment.