---
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
---
ASYNC101.py:10:5: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
   |
 9 | async def func():
10 |     open("foo")
   |     ^^^^ ASYNC101
   |

ASYNC101.py:14:5: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
   |
13 | async def func():
14 |     time.sleep(1)
   |     ^^^^^^^^^^ ASYNC101
   |

ASYNC101.py:18:5: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
   |
17 | async def func():
18 |     subprocess.run("foo")
   |     ^^^^^^^^^^^^^^ ASYNC101
   |

ASYNC101.py:22:5: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
   |
21 | async def func():
22 |     subprocess.call("foo")
   |     ^^^^^^^^^^^^^^^ ASYNC101
   |

ASYNC101.py:30:5: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
   |
29 | async def func():
30 |     os.wait4(10)
   |     ^^^^^^^^ ASYNC101
   |

ASYNC101.py:34:5: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
   |
33 | async def func():
34 |     os.wait(12)
   |     ^^^^^^^ ASYNC101
   |

ASYNC101.py:41:5: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
   |
40 | async def func():
41 |     Path("foo").open()  # ASYNC101
   |     ^^^^^^^^^^^^^^^^ ASYNC101
   |

ASYNC101.py:46:5: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
   |
44 | async def func():
45 |     p = Path("foo")
46 |     p.open()  # ASYNC101
   |     ^^^^^^ ASYNC101
   |

ASYNC101.py:50:10: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
   |
49 | async def func():
50 |     with Path("foo").open() as f:  # ASYNC101
   |          ^^^^^^^^^^^^^^^^ ASYNC101
51 |         pass
   |

ASYNC101.py:58:9: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
   |
57 |     async def bar():
58 |         p.open()  # ASYNC101
   |         ^^^^^^ ASYNC101
   |

ASYNC101.py:64:5: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
   |
62 |     (p1, p2) = (Path("foo"), Path("bar"))
63 | 
64 |     p1.open()  # ASYNC101
   |     ^^^^^^^ ASYNC101
   |


