ruff/crates/ruff_linter
GiGaGon 523174e8be
[flake8-async] Make ASYNC100 example error out-of-the-box (#18993)
## Summary

Part of #18972

This PR makes [cancel-scope-no-checkpoint
(ASYNC100)](https://docs.astral.sh/ruff/rules/cancel-scope-no-checkpoint/#cancel-scope-no-checkpoint-async100)'s
example error out-of-the-box

[Old example](https://play.ruff.rs/6a399ae5-9b89-4438-b808-6604f1e40a70)
```py
async def func():
    async with asyncio.timeout(2):
        do_something()
```

[New example](https://play.ruff.rs/c44db531-d2f8-4a61-9e04-e5fc0ea989e3)
```py
import asyncio


async def func():
    async with asyncio.timeout(2):
        do_something()
```

## Test Plan

<!-- How was it tested? -->

N/A, no functionality/tests affected
2025-06-28 10:13:54 -05:00
..
resources [flake8-pyi] Expand Optional[A] to A | None (PYI016) (#18572) 2025-06-27 15:43:11 +00:00
src [flake8-async] Make ASYNC100 example error out-of-the-box (#18993) 2025-06-28 10:13:54 -05:00
Cargo.toml Convert OldDiagnostic::noqa_code to an Option<String> (#18946) 2025-06-27 11:36:55 -04:00