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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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