|
1 | 1 | ---
|
2 | 2 | source: crates/ruff_linter/src/rules/flake8_async/mod.rs
|
3 |
| -snapshot_kind: text |
4 | 3 | ---
|
5 | 4 | ASYNC100.py:8: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.
|
6 | 5 | |
|
7 | 6 | 7 | async def func():
|
8 |
| -8 | with trio.fail_after(): |
9 |
| - | _____^ |
| 7 | +8 | / with trio.fail_after(): |
10 | 8 | 9 | | ...
|
11 | 9 | | |___________^ ASYNC100
|
12 | 10 | |
|
13 | 11 |
|
14 | 12 | ASYNC100.py:18: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.
|
15 | 13 | |
|
16 | 14 | 17 | async def func():
|
17 |
| -18 | with trio.move_on_after(): |
18 |
| - | _____^ |
| 15 | +18 | / with trio.move_on_after(): |
19 | 16 | 19 | | ...
|
20 | 17 | | |___________^ ASYNC100
|
21 | 18 | |
|
22 | 19 |
|
23 | 20 | ASYNC100.py:45: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.
|
24 | 21 | |
|
25 | 22 | 44 | async def func():
|
26 |
| -45 | with anyio.move_on_after(delay=0.2): |
27 |
| - | _____^ |
| 23 | +45 | / with anyio.move_on_after(delay=0.2): |
28 | 24 | 46 | | ...
|
29 | 25 | | |___________^ ASYNC100
|
30 | 26 | |
|
31 | 27 |
|
32 | 28 | ASYNC100.py:50: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.
|
33 | 29 | |
|
34 | 30 | 49 | async def func():
|
35 |
| -50 | with anyio.fail_after(): |
36 |
| - | _____^ |
| 31 | +50 | / with anyio.fail_after(): |
37 | 32 | 51 | | ...
|
38 | 33 | | |___________^ ASYNC100
|
39 | 34 | |
|
40 | 35 |
|
41 | 36 | ASYNC100.py:55: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.
|
42 | 37 | |
|
43 | 38 | 54 | async def func():
|
44 |
| -55 | with anyio.CancelScope(): |
45 |
| - | _____^ |
| 39 | +55 | / with anyio.CancelScope(): |
46 | 40 | 56 | | ...
|
47 | 41 | | |___________^ ASYNC100
|
48 | 42 | |
|
49 | 43 |
|
50 | 44 | ASYNC100.py:60: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.
|
51 | 45 | |
|
52 | 46 | 59 | async def func():
|
53 |
| -60 | with anyio.CancelScope(), nullcontext(): |
54 |
| - | _____^ |
| 47 | +60 | / with anyio.CancelScope(), nullcontext(): |
55 | 48 | 61 | | ...
|
56 | 49 | | |___________^ ASYNC100
|
57 | 50 | |
|
58 | 51 |
|
59 | 52 | ASYNC100.py:65: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.
|
60 | 53 | |
|
61 | 54 | 64 | async def func():
|
62 |
| -65 | with nullcontext(), anyio.CancelScope(): |
63 |
| - | _____^ |
| 55 | +65 | / with nullcontext(), anyio.CancelScope(): |
64 | 56 | 66 | | ...
|
65 | 57 | | |___________^ ASYNC100
|
66 | 58 | |
|
67 | 59 |
|
68 | 60 | ASYNC100.py:70: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.
|
69 | 61 | |
|
70 | 62 | 69 | async def func():
|
71 |
| -70 | async with asyncio.timeout(delay=0.2): |
72 |
| - | _____^ |
| 63 | +70 | / async with asyncio.timeout(delay=0.2): |
73 | 64 | 71 | | ...
|
74 | 65 | | |___________^ ASYNC100
|
75 | 66 | |
|
76 | 67 |
|
77 | 68 | ASYNC100.py:75: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.
|
78 | 69 | |
|
79 | 70 | 74 | async def func():
|
80 |
| -75 | async with asyncio.timeout_at(when=0.2): |
81 |
| - | _____^ |
| 71 | +75 | / async with asyncio.timeout_at(when=0.2): |
82 | 72 | 76 | | ...
|
83 | 73 | | |___________^ ASYNC100
|
84 | 74 | |
|
85 | 75 |
|
86 | 76 | ASYNC100.py:85: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.
|
87 | 77 | |
|
88 | 78 | 84 | async def func():
|
89 |
| -85 | async with asyncio.timeout(delay=0.2), asyncio.TaskGroup(), asyncio.timeout(delay=0.2): |
90 |
| - | _____^ |
| 79 | +85 | / async with asyncio.timeout(delay=0.2), asyncio.TaskGroup(), asyncio.timeout(delay=0.2): |
91 | 80 | 86 | | ...
|
92 | 81 | | |___________^ ASYNC100
|
93 | 82 | |
|
94 | 83 |
|
95 | 84 | ASYNC100.py:95: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.
|
96 | 85 | |
|
97 | 86 | 94 | async def func():
|
98 |
| -95 | async with asyncio.timeout(delay=0.2), asyncio.timeout(delay=0.2): |
99 |
| - | _____^ |
| 87 | +95 | / async with asyncio.timeout(delay=0.2), asyncio.timeout(delay=0.2): |
100 | 88 | 96 | | ...
|
101 | 89 | | |___________^ ASYNC100
|
102 | 90 | |
|
0 commit comments