@@ -16,7 +16,9 @@ async def test_thousand_clients(rtc_create_file, rtc_connect_doc_client):
16
16
file_type = "file"
17
17
await rtc_create_file (file_path )
18
18
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 :
20
22
ydoc = doc .ydoc
21
23
test_array = ydoc .get_array ("test" )
22
24
@@ -29,7 +31,7 @@ async def fn(format: str, type: str, path: str, doc: YUnicode, content: int | No
29
31
await sleep (0.2 )
30
32
31
33
clients = []
32
- for i in range (1000 ):
34
+ for _ in range (1000 ):
33
35
doc = YUnicode ()
34
36
clients .append (create_task (fn (file_format , file_type , file_path , doc , 1 )))
35
37
@@ -48,7 +50,9 @@ async def test_thousand_clients_insert_text(rtc_create_file, rtc_connect_doc_cli
48
50
file_type = "file"
49
51
await rtc_create_file (file_path )
50
52
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 :
52
56
async with await rtc_connect_doc_client (format , type , path ) as ws , WebsocketProvider (
53
57
doc .ydoc , ws
54
58
):
@@ -63,7 +67,7 @@ async def fn(format: str, type: str, path: str, doc: YUnicode, content: str | No
63
67
res = len (content ) * n
64
68
65
69
clients = []
66
- for i in range (n ):
70
+ for _ in range (n ):
67
71
doc = YUnicode ()
68
72
clients .append (create_task (fn (file_format , file_type , file_path , doc , content )))
69
73
@@ -81,7 +85,9 @@ async def test_hundred_clients_insert_cell(rtc_create_notebook, rtc_connect_doc_
81
85
file_type = "notebook"
82
86
await rtc_create_notebook (file_path )
83
87
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 :
85
91
async with await rtc_connect_doc_client (format , type , path ) as ws , WebsocketProvider (
86
92
doc .ydoc , ws
87
93
):
@@ -91,7 +97,7 @@ async def fn(format: str, type: str, path: str, doc: YNotebook, content: str | N
91
97
92
98
n = 100
93
99
clients = []
94
- for i in range (n ):
100
+ for _ in range (n ):
95
101
doc = YNotebook ()
96
102
clients .append (create_task (fn (file_format , file_type , file_path , doc , "test" )))
97
103
0 commit comments