---
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
---
ASYNC221 Async functions should not run processes with blocking methods
 --> ASYNC22x.py:8:5
  |
7 | async def func():
8 |     subprocess.run("foo")  # ASYNC221
  |     ^^^^^^^^^^^^^^
  |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:12:5
   |
11 | async def func():
12 |     subprocess.call("foo")  # ASYNC221
   |     ^^^^^^^^^^^^^^^
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:29:9
   |
27 | async def foo():
28 |     await async_fun(
29 |         subprocess.getoutput()  # ASYNC221
   |         ^^^^^^^^^^^^^^^^^^^^
30 |     )
31 |     subprocess.Popen()  # ASYNC220
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:32:5
   |
30 |     )
31 |     subprocess.Popen()  # ASYNC220
32 |     os.system()  # ASYNC221
   |     ^^^^^^^^^
33 |
34 |     system()
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:38:5
   |
36 |     os.anything()
37 |
38 |     subprocess.run()  # ASYNC221
   |     ^^^^^^^^^^^^^^
39 |     subprocess.call()  # ASYNC221
40 |     subprocess.check_call()  # ASYNC221
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:39:5
   |
38 |     subprocess.run()  # ASYNC221
39 |     subprocess.call()  # ASYNC221
   |     ^^^^^^^^^^^^^^^
40 |     subprocess.check_call()  # ASYNC221
41 |     subprocess.check_output()  # ASYNC221
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:40:5
   |
38 |     subprocess.run()  # ASYNC221
39 |     subprocess.call()  # ASYNC221
40 |     subprocess.check_call()  # ASYNC221
   |     ^^^^^^^^^^^^^^^^^^^^^
41 |     subprocess.check_output()  # ASYNC221
42 |     subprocess.getoutput()  # ASYNC221
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:41:5
   |
39 |     subprocess.call()  # ASYNC221
40 |     subprocess.check_call()  # ASYNC221
41 |     subprocess.check_output()  # ASYNC221
   |     ^^^^^^^^^^^^^^^^^^^^^^^
42 |     subprocess.getoutput()  # ASYNC221
43 |     subprocess.getstatusoutput()  # ASYNC221
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:42:5
   |
40 |     subprocess.check_call()  # ASYNC221
41 |     subprocess.check_output()  # ASYNC221
42 |     subprocess.getoutput()  # ASYNC221
   |     ^^^^^^^^^^^^^^^^^^^^
43 |     subprocess.getstatusoutput()  # ASYNC221
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:43:5
   |
41 |     subprocess.check_output()  # ASYNC221
42 |     subprocess.getoutput()  # ASYNC221
43 |     subprocess.getstatusoutput()  # ASYNC221
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
44 |
45 |     await async_fun(
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:46:9
   |
45 |     await async_fun(
46 |         subprocess.getoutput()  # ASYNC221
   |         ^^^^^^^^^^^^^^^^^^^^
47 |     )
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:54:5
   |
52 |     subprocess()
53 |
54 |     os.posix_spawn()  # ASYNC221
   |     ^^^^^^^^^^^^^^
55 |     os.posix_spawnp()  # ASYNC221
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:55:5
   |
54 |     os.posix_spawn()  # ASYNC221
55 |     os.posix_spawnp()  # ASYNC221
   |     ^^^^^^^^^^^^^^^
56 |
57 |     os.spawn()
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:61:5
   |
59 |     os.spawnllll()
60 |
61 |     os.spawnl()  # ASYNC221
   |     ^^^^^^^^^
62 |     os.spawnle()  # ASYNC221
63 |     os.spawnlp()  # ASYNC221
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:62:5
   |
61 |     os.spawnl()  # ASYNC221
62 |     os.spawnle()  # ASYNC221
   |     ^^^^^^^^^^
63 |     os.spawnlp()  # ASYNC221
64 |     os.spawnlpe()  # ASYNC221
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:63:5
   |
61 |     os.spawnl()  # ASYNC221
62 |     os.spawnle()  # ASYNC221
63 |     os.spawnlp()  # ASYNC221
   |     ^^^^^^^^^^
64 |     os.spawnlpe()  # ASYNC221
65 |     os.spawnv()  # ASYNC221
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:64:5
   |
62 |     os.spawnle()  # ASYNC221
63 |     os.spawnlp()  # ASYNC221
64 |     os.spawnlpe()  # ASYNC221
   |     ^^^^^^^^^^^
65 |     os.spawnv()  # ASYNC221
66 |     os.spawnve()  # ASYNC221
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:65:5
   |
63 |     os.spawnlp()  # ASYNC221
64 |     os.spawnlpe()  # ASYNC221
65 |     os.spawnv()  # ASYNC221
   |     ^^^^^^^^^
66 |     os.spawnve()  # ASYNC221
67 |     os.spawnvp()  # ASYNC221
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:66:5
   |
64 |     os.spawnlpe()  # ASYNC221
65 |     os.spawnv()  # ASYNC221
66 |     os.spawnve()  # ASYNC221
   |     ^^^^^^^^^^
67 |     os.spawnvp()  # ASYNC221
68 |     os.spawnvpe()  # ASYNC221
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:67:5
   |
65 |     os.spawnv()  # ASYNC221
66 |     os.spawnve()  # ASYNC221
67 |     os.spawnvp()  # ASYNC221
   |     ^^^^^^^^^^
68 |     os.spawnvpe()  # ASYNC221
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:68:5
   |
66 |     os.spawnve()  # ASYNC221
67 |     os.spawnvp()  # ASYNC221
68 |     os.spawnvpe()  # ASYNC221
   |     ^^^^^^^^^^^
69 |
70 |     P_NOWAIT = os.P_NOWAIT
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:81:5
   |
80 |     # if it is P_WAIT, ASYNC221
81 |     os.spawnl(P_WAIT)  # ASYNC221
   |     ^^^^^^^^^
82 |     os.spawnl(mode=os.P_WAIT)  # ASYNC221
83 |     os.spawnl(mode=P_WAIT)  # ASYNC221
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:82:5
   |
80 |     # if it is P_WAIT, ASYNC221
81 |     os.spawnl(P_WAIT)  # ASYNC221
82 |     os.spawnl(mode=os.P_WAIT)  # ASYNC221
   |     ^^^^^^^^^
83 |     os.spawnl(mode=P_WAIT)  # ASYNC221
   |

ASYNC221 Async functions should not run processes with blocking methods
  --> ASYNC22x.py:83:5
   |
81 |     os.spawnl(P_WAIT)  # ASYNC221
82 |     os.spawnl(mode=os.P_WAIT)  # ASYNC221
83 |     os.spawnl(mode=P_WAIT)  # ASYNC221
   |     ^^^^^^^^^
84 |
85 |     # other weird cases: ASYNC220
   |
