@@ -4,7 +4,7 @@ source: crates/ruff_linter/src/rules/flake8_async/mod.rs
4
4
ASYNC100 .py :7 :5 : ASYNC100 A ` with trio.fail_after(...):` context does not contain any ` await` statements . This makes it pointless , as the timeout can only be triggered by a checkpoint .
5
5
|
6
6
6 | async def func ():
7
- 7 | with trio .fail_after ():
7
+ 7 | async with trio .fail_after ():
8
8
| _____ ^
9
9
8 | | ...
10
10
| | ___________ ^ ASYNC100
@@ -13,7 +13,7 @@ ASYNC100.py:7:5: ASYNC100 A `with trio.fail_after(...):` context does not contai
13
13
ASYNC100 .py :17 :5 : ASYNC100 A ` with trio.move_on_after(...):` context does not contain any ` await` statements . This makes it pointless , as the timeout can only be triggered by a checkpoint .
14
14
|
15
15
16 | async def func ():
16
- 17 | with trio .move_on_after ():
16
+ 17 | async with trio .move_on_after ():
17
17
| _____ ^
18
18
18 | | ...
19
19
| | ___________ ^ ASYNC100
@@ -22,7 +22,7 @@ ASYNC100.py:17:5: ASYNC100 A `with trio.move_on_after(...):` context does not co
22
22
ASYNC100 .py :33 :5 : ASYNC100 A ` with anyio.move_on_after(...):` context does not contain any ` await` statements . This makes it pointless , as the timeout can only be triggered by a checkpoint .
23
23
|
24
24
32 | async def func ():
25
- 33 | with anyio .move_on_after ():
25
+ 33 | async with anyio .move_on_after (delay = 0.2 ):
26
26
| _____ ^
27
27
34 | | ...
28
28
| | ___________ ^ ASYNC100
@@ -31,7 +31,7 @@ ASYNC100.py:33:5: ASYNC100 A `with anyio.move_on_after(...):` context does not c
31
31
ASYNC100 .py :38 :5 : ASYNC100 A ` with anyio.fail_after(...):` context does not contain any ` await` statements . This makes it pointless , as the timeout can only be triggered by a checkpoint .
32
32
|
33
33
37 | async def func ():
34
- 38 | with anyio .fail_after ():
34
+ 38 | async with anyio .fail_after ():
35
35
| _____ ^
36
36
39 | | ...
37
37
| | ___________ ^ ASYNC100
@@ -40,7 +40,7 @@ ASYNC100.py:38:5: ASYNC100 A `with anyio.fail_after(...):` context does not cont
40
40
ASYNC100 .py :43 :5 : ASYNC100 A ` with anyio.CancelScope(...):` context does not contain any ` await` statements . This makes it pointless , as the timeout can only be triggered by a checkpoint .
41
41
|
42
42
42 | async def func ():
43
- 43 | with anyio .CancelScope ():
43
+ 43 | async with anyio .CancelScope ():
44
44
| _____ ^
45
45
44 | | ...
46
46
| | ___________ ^ ASYNC100
@@ -49,7 +49,7 @@ ASYNC100.py:43:5: ASYNC100 A `with anyio.CancelScope(...):` context does not con
49
49
ASYNC100 .py :48 :5 : ASYNC100 A ` with anyio.CancelScope(...):` context does not contain any ` await` statements . This makes it pointless , as the timeout can only be triggered by a checkpoint .
50
50
|
51
51
47 | async def func ():
52
- 48 | with anyio .CancelScope ():
52
+ 48 | async with anyio .CancelScope ():
53
53
| _____ ^
54
54
49 | | ...
55
55
| | ___________ ^ ASYNC100
@@ -58,7 +58,7 @@ ASYNC100.py:48:5: ASYNC100 A `with anyio.CancelScope(...):` context does not con
58
58
ASYNC100 .py :53 :5 : ASYNC100 A ` with asyncio.timeout(...):` context does not contain any ` await` statements . This makes it pointless , as the timeout can only be triggered by a checkpoint .
59
59
|
60
60
52 | async def func ():
61
- 53 | with asyncio .timeout ():
61
+ 53 | async with asyncio .timeout (delay = 0.2 ):
62
62
| _____ ^
63
63
54 | | ...
64
64
| | ___________ ^ ASYNC100
@@ -67,7 +67,7 @@ ASYNC100.py:53:5: ASYNC100 A `with asyncio.timeout(...):` context does not conta
67
67
ASYNC100 .py :58 :5 : ASYNC100 A ` with asyncio.timeout_at(...):` context does not contain any ` await` statements . This makes it pointless , as the timeout can only be triggered by a checkpoint .
68
68
|
69
69
57 | async def func ():
70
- 58 | with asyncio .timeout_at ():
70
+ 58 | async with asyncio .timeout_at (when = 0.2 ):
71
71
| _____ ^
72
72
59 | | ...
73
73
| | ___________ ^ ASYNC100
0 commit comments