Skip to content

Commit 3f1f5bd

Browse files
committed
lint
1 parent 378d6db commit 3f1f5bd

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

redis/commands/core.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3295,7 +3295,12 @@ async def hscan_iter(
32953295
cursor = "0"
32963296
while cursor != 0:
32973297
cursor, data = await self.hscan(
3298-
name, cursor=cursor, match=match, count=count, no_values=no_values, _iter_req_id=iter_req_id
3298+
name,
3299+
cursor=cursor,
3300+
match=match,
3301+
count=count,
3302+
no_values=no_values,
3303+
_iter_req_id=iter_req_id,
32993304
)
33003305
if no_values:
33013306
for it in data:

tests/test_asyncio/test_sentinel_managed_connection.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import socket
2+
import uuid
23
from typing import Tuple
3-
from unittest.mock import AsyncMock, ANY
4+
from unittest.mock import ANY, AsyncMock
45

56
import pytest
67
import pytest_asyncio
7-
import uuid
88
from redis.asyncio.retry import Retry
9-
from redis.commands.core import AsyncScanCommands
109
from redis.asyncio.sentinel import (
1110
Sentinel,
1211
SentinelConnectionPool,
1312
SentinelManagedConnection,
1413
)
1514
from redis.backoff import NoBackoff
15+
from redis.commands.core import AsyncScanCommands
1616

1717
from .compat import mock
1818

@@ -251,20 +251,20 @@ async def test_connects_to_same_address_if_no_iter_req_id_master(
251251
async def test_scan_iter_family_executes_commands_with_same_iter_req_id():
252252
"""Assert that all calls to execute_command receives the _iter_req_id kwarg"""
253253
with mock.patch.object(
254-
AsyncScanCommands,
255-
"execute_command",
256-
AsyncMock(return_value=(0, []))
254+
AsyncScanCommands, "execute_command", AsyncMock(return_value=(0, []))
257255
) as mock_execute_command, mock.patch.object(uuid, "uuid4", return_value="uuid"):
258256
[a async for a in AsyncScanCommands().scan_iter()]
259-
mock_execute_command.assert_called_with('SCAN', '0', _iter_req_id="uuid")
257+
mock_execute_command.assert_called_with("SCAN", "0", _iter_req_id="uuid")
260258
[a async for a in AsyncScanCommands().sscan_iter("")]
261-
mock_execute_command.assert_called_with('SSCAN', '', '0', _iter_req_id="uuid")
259+
mock_execute_command.assert_called_with("SSCAN", "", "0", _iter_req_id="uuid")
262260
with mock.patch.object(
263-
AsyncScanCommands,
264-
"execute_command",
265-
AsyncMock(return_value=(0, {}))
261+
AsyncScanCommands, "execute_command", AsyncMock(return_value=(0, {}))
266262
) as mock_execute_command, mock.patch.object(uuid, "uuid4", return_value="uuid"):
267263
[a async for a in AsyncScanCommands().hscan_iter("")]
268-
mock_execute_command.assert_called_with('HSCAN', '', '0', no_values=None, _iter_req_id="uuid")
264+
mock_execute_command.assert_called_with(
265+
"HSCAN", "", "0", no_values=None, _iter_req_id="uuid"
266+
)
269267
[a async for a in AsyncScanCommands().zscan_iter("")]
270-
mock_execute_command.assert_called_with('ZSCAN', '', '0', score_cast_func=ANY, _iter_req_id="uuid")
268+
mock_execute_command.assert_called_with(
269+
"ZSCAN", "", "0", score_cast_func=ANY, _iter_req_id="uuid"
270+
)

0 commit comments

Comments
 (0)