Skip to content

Commit 7b858b6

Browse files
committed
pre-commit
1 parent b9aed05 commit 7b858b6

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

tests/test_general.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ async def test_thousand_clients(rtc_create_file, rtc_connect_doc_client):
1616
file_type = "file"
1717
await rtc_create_file(file_path)
1818

19-
async def fn(format: str, type: str, path: str, doc: YUnicode, content: int | None = None):
19+
async def fn(
20+
format: str, type: str, path: str, doc: YUnicode, content: int | None = None
21+
) -> None:
2022
ydoc = doc.ydoc
2123
test_array = ydoc.get_array("test")
2224

@@ -29,7 +31,7 @@ async def fn(format: str, type: str, path: str, doc: YUnicode, content: int | No
2931
await sleep(0.2)
3032

3133
clients = []
32-
for i in range(1000):
34+
for _ in range(1000):
3335
doc = YUnicode()
3436
clients.append(create_task(fn(file_format, file_type, file_path, doc, 1)))
3537

@@ -48,7 +50,9 @@ async def test_thousand_clients_insert_text(rtc_create_file, rtc_connect_doc_cli
4850
file_type = "file"
4951
await rtc_create_file(file_path)
5052

51-
async def fn(format: str, type: str, path: str, doc: YUnicode, content: str | None = None):
53+
async def fn(
54+
format: str, type: str, path: str, doc: YUnicode, content: str | None = None
55+
) -> None:
5256
async with await rtc_connect_doc_client(format, type, path) as ws, WebsocketProvider(
5357
doc.ydoc, ws
5458
):
@@ -63,7 +67,7 @@ async def fn(format: str, type: str, path: str, doc: YUnicode, content: str | No
6367
res = len(content) * n
6468

6569
clients = []
66-
for i in range(n):
70+
for _ in range(n):
6771
doc = YUnicode()
6872
clients.append(create_task(fn(file_format, file_type, file_path, doc, content)))
6973

@@ -81,7 +85,9 @@ async def test_hundred_clients_insert_cell(rtc_create_notebook, rtc_connect_doc_
8185
file_type = "notebook"
8286
await rtc_create_notebook(file_path)
8387

84-
async def fn(format: str, type: str, path: str, doc: YNotebook, content: str | None = ""):
88+
async def fn(
89+
format: str, type: str, path: str, doc: YNotebook, content: str | None = ""
90+
) -> None:
8591
async with await rtc_connect_doc_client(format, type, path) as ws, WebsocketProvider(
8692
doc.ydoc, ws
8793
):
@@ -91,7 +97,7 @@ async def fn(format: str, type: str, path: str, doc: YNotebook, content: str | N
9197

9298
n = 100
9399
clients = []
94-
for i in range(n):
100+
for _ in range(n):
95101
doc = YNotebook()
96102
clients.append(create_task(fn(file_format, file_type, file_path, doc, "test")))
97103

0 commit comments

Comments
 (0)