Skip to content

Commit 8de824f

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
1 parent a1206af commit 8de824f

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

returns/primitives/reawaitable.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import anyio # noqa: WPS433
88
except ImportError:
99
import asyncio # noqa: WPS433
10+
1011
Lock = asyncio.Lock
1112
else:
1213
Lock = anyio.Lock

tests/test_primitives/test_reawaitable/test_reawaitable_concurrency.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
# https://github.com/dry-python/returns/issues/2108
99
async def sample_coro() -> str:
1010
"""Sample coroutine that simulates an async operation."""
11-
await anyio.sleep(1) # Increased from 0.1 to reduce chance of random failures
11+
await anyio.sleep(
12+
1
13+
) # Increased from 0.1 to reduce chance of random failures
1214
return 'done'
1315

1416

@@ -32,8 +34,10 @@ async def test_reawaitable_decorator() -> None:
3234
"""Test the reawaitable decorator with concurrent awaits."""
3335

3436
async def test_coro() -> str: # noqa: WPS430
35-
await anyio.sleep(1) # Increased from 0.1 to reduce chance of random failures
36-
return "decorated"
37+
await anyio.sleep(
38+
1
39+
) # Increased from 0.1 to reduce chance of random failures
40+
return 'decorated'
3741

3842
decorated = reawaitable(test_coro)
3943
instance = decorated()
@@ -42,7 +46,7 @@ async def test_coro() -> str: # noqa: WPS430
4246
result1 = await instance
4347
result2 = await instance
4448

45-
assert result1 == "decorated"
49+
assert result1 == 'decorated'
4650
assert result1 == result2
4751

4852
# Test concurrent awaits

0 commit comments

Comments
 (0)