ruff/crates
GiGaGon ed2e90371b
[flake8-async] Make ASYNC210 example error out-of-the-box (#18977)
## Summary

Part of #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
2025-06-28 10:11:38 -05:00
..
ruff Convert OldDiagnostic::noqa_code to an Option<String> (#18946) 2025-06-27 11:36:55 -04:00
ruff_annotate_snippets [ty] Add regression test for leading tab mis-alignment in diagnostic rendering (#18965) 2025-06-26 16:27:26 +00:00
ruff_benchmark [ty] Reduce 'complex_constrained_attributes_2' runtime (#19001) 2025-06-27 23:15:45 +02:00
ruff_cache
ruff_db [ty] Add environment variable to dump Salsa memory usage stats (#18928) 2025-06-26 21:27:51 +00:00
ruff_dev Remove Message::to_rule (#18447) 2025-06-05 12:48:29 -04:00
ruff_diagnostics Add a ViolationMetadata::rule method (#18234) 2025-05-28 09:27:09 -04:00
ruff_formatter
ruff_graph [ty] Resolve python environment in Options::to_program_settings (#18960) 2025-06-26 17:57:16 +02:00
ruff_index [ty] Add environment variable to dump Salsa memory usage stats (#18928) 2025-06-26 21:27:51 +00:00
ruff_linter [flake8-async] Make ASYNC210 example error out-of-the-box (#18977) 2025-06-28 10:11:38 -05:00
ruff_macros Apply fix availability and applicability when adding to DiagnosticGuard and remove NoqaCode::rule (#18834) 2025-06-24 10:08:36 -04:00
ruff_notebook
ruff_options_metadata
ruff_python_ast [flake8-pyi] Expand Optional[A] to A | None (PYI016) (#18572) 2025-06-27 15:43:11 +00:00
ruff_python_ast_integration_tests [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
ruff_python_codegen Fix f-string interpolation escaping (#18882) 2025-06-25 10:04:15 +02:00
ruff_python_formatter [formatter] Fix missing blank lines before decorated classes in .pyi files (#18888) 2025-06-24 16:25:44 +02:00
ruff_python_index
ruff_python_literal
ruff_python_parser [ty] Add environment variable to dump Salsa memory usage stats (#18928) 2025-06-26 21:27:51 +00:00
ruff_python_semantic [flake8-pyi] Expand Optional[A] to A | None (PYI016) (#18572) 2025-06-27 15:43:11 +00:00
ruff_python_stdlib
ruff_python_trivia Treat ty: comments as pragma comments (#18532) 2025-06-07 16:02:43 +02:00
ruff_python_trivia_integration_tests
ruff_server Convert OldDiagnostic::noqa_code to an Option<String> (#18946) 2025-06-27 11:36:55 -04:00
ruff_source_file [ty] Add environment variable to dump Salsa memory usage stats (#18928) 2025-06-26 21:27:51 +00:00
ruff_text_size [ty] Add environment variable to dump Salsa memory usage stats (#18928) 2025-06-26 21:27:51 +00:00
ruff_wasm Convert OldDiagnostic::noqa_code to an Option<String> (#18946) 2025-06-27 11:36:55 -04:00
ruff_workspace Apply fix availability and applicability when adding to DiagnosticGuard and remove NoqaCode::rule (#18834) 2025-06-24 10:08:36 -04:00
ty [ty] Add environment variable to dump Salsa memory usage stats (#18928) 2025-06-26 21:27:51 +00:00
ty_ide [ty] Add builtins to completions derived from scope (#18982) 2025-06-27 10:20:01 -04:00
ty_project [ty] Add environment variable to dump Salsa memory usage stats (#18928) 2025-06-26 21:27:51 +00:00
ty_python_semantic [ty] Followups to tuple constructor improvements in #18987 (#19000) 2025-06-27 22:09:14 +01:00
ty_server [ty] Add builtins to completions derived from scope (#18982) 2025-06-27 10:20:01 -04:00
ty_test [ty] Resolve python environment in Options::to_program_settings (#18960) 2025-06-26 17:57:16 +02:00
ty_vendored [ty] eliminate is_fully_static (#18799) 2025-06-24 18:02:05 -07:00
ty_wasm [ty] Add builtins to completions derived from scope (#18982) 2025-06-27 10:20:01 -04:00