---
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
---
ASYNC210.py:8:5: ASYNC210 Async functions should not call blocking HTTP methods
  |
7 | async def foo():
8 |     urllib.request.urlopen("http://example.com/foo/bar").read()  # ASYNC210
  |     ^^^^^^^^^^^^^^^^^^^^^^ ASYNC210
  |

ASYNC210.py:12:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
11 | async def foo():
12 |     requests.get()  # ASYNC210
   |     ^^^^^^^^^^^^ ASYNC210
   |

ASYNC210.py:16:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
15 | async def foo():
16 |     httpx.get()  # ASYNC210
   |     ^^^^^^^^^ ASYNC210
   |

ASYNC210.py:20:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
19 | async def foo():
20 |     requests.post()  # ASYNC210
   |     ^^^^^^^^^^^^^ ASYNC210
   |

ASYNC210.py:24:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
23 | async def foo():
24 |     httpx.post()  # ASYNC210
   |     ^^^^^^^^^^ ASYNC210
   |

ASYNC210.py:28:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
27 | async def foo():
28 |     requests.get()  # ASYNC210
   |     ^^^^^^^^^^^^ ASYNC210
29 |     requests.get(...)  # ASYNC210
30 |     requests.get  # Ok
   |

ASYNC210.py:29:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
27 | async def foo():
28 |     requests.get()  # ASYNC210
29 |     requests.get(...)  # ASYNC210
   |     ^^^^^^^^^^^^ ASYNC210
30 |     requests.get  # Ok
31 |     print(requests.get())  # ASYNC210
   |

ASYNC210.py:31:11: ASYNC210 Async functions should not call blocking HTTP methods
   |
29 |     requests.get(...)  # ASYNC210
30 |     requests.get  # Ok
31 |     print(requests.get())  # ASYNC210
   |           ^^^^^^^^^^^^ ASYNC210
32 |     print(requests.get(requests.get()))  # ASYNC210
   |

ASYNC210.py:32:11: ASYNC210 Async functions should not call blocking HTTP methods
   |
30 |     requests.get  # Ok
31 |     print(requests.get())  # ASYNC210
32 |     print(requests.get(requests.get()))  # ASYNC210
   |           ^^^^^^^^^^^^ ASYNC210
33 |
34 |     requests.options()  # ASYNC210
   |

ASYNC210.py:32:24: ASYNC210 Async functions should not call blocking HTTP methods
   |
30 |     requests.get  # Ok
31 |     print(requests.get())  # ASYNC210
32 |     print(requests.get(requests.get()))  # ASYNC210
   |                        ^^^^^^^^^^^^ ASYNC210
33 |
34 |     requests.options()  # ASYNC210
   |

ASYNC210.py:34:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
32 |     print(requests.get(requests.get()))  # ASYNC210
33 |
34 |     requests.options()  # ASYNC210
   |     ^^^^^^^^^^^^^^^^ ASYNC210
35 |     requests.head()  # ASYNC210
36 |     requests.post()  # ASYNC210
   |

ASYNC210.py:35:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
34 |     requests.options()  # ASYNC210
35 |     requests.head()  # ASYNC210
   |     ^^^^^^^^^^^^^ ASYNC210
36 |     requests.post()  # ASYNC210
37 |     requests.put()  # ASYNC210
   |

ASYNC210.py:36:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
34 |     requests.options()  # ASYNC210
35 |     requests.head()  # ASYNC210
36 |     requests.post()  # ASYNC210
   |     ^^^^^^^^^^^^^ ASYNC210
37 |     requests.put()  # ASYNC210
38 |     requests.patch()  # ASYNC210
   |

ASYNC210.py:37:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
35 |     requests.head()  # ASYNC210
36 |     requests.post()  # ASYNC210
37 |     requests.put()  # ASYNC210
   |     ^^^^^^^^^^^^ ASYNC210
38 |     requests.patch()  # ASYNC210
39 |     requests.delete()  # ASYNC210
   |

ASYNC210.py:38:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
36 |     requests.post()  # ASYNC210
37 |     requests.put()  # ASYNC210
38 |     requests.patch()  # ASYNC210
   |     ^^^^^^^^^^^^^^ ASYNC210
39 |     requests.delete()  # ASYNC210
40 |     requests.foo()
   |

ASYNC210.py:39:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
37 |     requests.put()  # ASYNC210
38 |     requests.patch()  # ASYNC210
39 |     requests.delete()  # ASYNC210
   |     ^^^^^^^^^^^^^^^ ASYNC210
40 |     requests.foo()
   |

ASYNC210.py:42:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
40 |     requests.foo()
41 |
42 |     httpx.options("")  # ASYNC210
   |     ^^^^^^^^^^^^^ ASYNC210
43 |     httpx.head("")  # ASYNC210
44 |     httpx.post("")  # ASYNC210
   |

ASYNC210.py:43:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
42 |     httpx.options("")  # ASYNC210
43 |     httpx.head("")  # ASYNC210
   |     ^^^^^^^^^^ ASYNC210
44 |     httpx.post("")  # ASYNC210
45 |     httpx.put("")  # ASYNC210
   |

ASYNC210.py:44:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
42 |     httpx.options("")  # ASYNC210
43 |     httpx.head("")  # ASYNC210
44 |     httpx.post("")  # ASYNC210
   |     ^^^^^^^^^^ ASYNC210
45 |     httpx.put("")  # ASYNC210
46 |     httpx.patch("")  # ASYNC210
   |

ASYNC210.py:45:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
43 |     httpx.head("")  # ASYNC210
44 |     httpx.post("")  # ASYNC210
45 |     httpx.put("")  # ASYNC210
   |     ^^^^^^^^^ ASYNC210
46 |     httpx.patch("")  # ASYNC210
47 |     httpx.delete("")  # ASYNC210
   |

ASYNC210.py:46:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
44 |     httpx.post("")  # ASYNC210
45 |     httpx.put("")  # ASYNC210
46 |     httpx.patch("")  # ASYNC210
   |     ^^^^^^^^^^^ ASYNC210
47 |     httpx.delete("")  # ASYNC210
48 |     httpx.foo()  # Ok
   |

ASYNC210.py:47:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
45 |     httpx.put("")  # ASYNC210
46 |     httpx.patch("")  # ASYNC210
47 |     httpx.delete("")  # ASYNC210
   |     ^^^^^^^^^^^^ ASYNC210
48 |     httpx.foo()  # Ok
   |

ASYNC210.py:50:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
48 |     httpx.foo()  # Ok
49 |
50 |     urllib3.request()  # ASYNC210
   |     ^^^^^^^^^^^^^^^ ASYNC210
51 |     urllib3.request(...)  # ASYNC210
   |

ASYNC210.py:51:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
50 |     urllib3.request()  # ASYNC210
51 |     urllib3.request(...)  # ASYNC210
   |     ^^^^^^^^^^^^^^^ ASYNC210
52 |
53 |     urllib.request.urlopen("")  # ASYNC210
   |

ASYNC210.py:53:5: ASYNC210 Async functions should not call blocking HTTP methods
   |
51 |     urllib3.request(...)  # ASYNC210
52 |
53 |     urllib.request.urlopen("")  # ASYNC210
   |     ^^^^^^^^^^^^^^^^^^^^^^ ASYNC210
54 |
55 |     r = {}
   |
