Commit ed2e903
authored
## Summary
Part of astral-sh#18972
This PR makes [blocking-http-call-in-async-function
(ASYNC210)](https://docs.astral.sh/ruff/rules/blocking-http-call-in-async-function/#blocking-http-call-in-async-function-async210)'s
example error out-of-the-box
[Old example](https://play.ruff.rs/20cba4f4-fe2f-428a-a721-311d1a081e64)
```py
async def fetch():
urllib.request.urlopen("https://example.com/foo/bar").read()
```
[New example](https://play.ruff.rs/5ca2a10d-5294-49ee-baee-0447f7188d9b)
```py
import urllib
async def fetch():
urllib.request.urlopen("https://example.com/foo/bar").read()
```
## Test Plan
<!-- How was it tested? -->
N/A, no functionality/tests affected
1 parent 90cb0d3 commit ed2e903
File tree
1 file changed
+6
-0
lines changed- crates/ruff_linter/src/rules/flake8_async/rules
1 file changed
+6
-0
lines changedLines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| |||
0 commit comments