From ff5023e058e001f9f0fc6a56da408b081c3d880b Mon Sep 17 00:00:00 2001 From: PLR <51248199+plredmond@users.noreply.github.com> Date: Mon, 15 Apr 2024 12:29:14 -0700 Subject: [PATCH] [`ruff`] Issue #9951, RUF029: ruff format the RUF029.py fixture --- .../resources/test/fixtures/ruff/RUF029.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/crates/ruff_linter/resources/test/fixtures/ruff/RUF029.py b/crates/ruff_linter/resources/test/fixtures/ruff/RUF029.py index ef75a9e27bf01..1798670d45f60 100644 --- a/crates/ruff_linter/resources/test/fixtures/ruff/RUF029.py +++ b/crates/ruff_linter/resources/test/fixtures/ruff/RUF029.py @@ -1,30 +1,34 @@ import time import asyncio -async def pass_case(): # OK: awaits a coroutine + +async def pass_case(): # OK: awaits a coroutine print("hello") await asyncio.sleep(1) print("world") -async def fail_case(): # RUF029 + +async def fail_case(): # RUF029 print("hello") time.sleep(1) print("world") -async def pass_case_2(): # OK: uses an async context manager +async def pass_case_2(): # OK: uses an async context manager async with None as i: pass -async def fail_case_2(): # RUF029 + +async def fail_case_2(): # RUF029 with None as i: pass -async def pass_case_3(): # OK: uses an async loop +async def pass_case_3(): # OK: uses an async loop async for i in []: pass -async def fail_case_3(): # RUF029 + +async def fail_case_3(): # RUF029 for i in []: pass