Skip to content

Commit 1569389

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
1 parent 2d8ae80 commit 1569389

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Diff for: returns/primitives/reawaitable.py

+2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
# Try to use anyio.Lock, fall back to asyncio.Lock
66
try:
77
import anyio
8+
89
Lock = anyio.Lock
910
except ImportError:
1011
import asyncio
12+
1113
Lock = asyncio.Lock
1214

1315
_ValueType = TypeVar('_ValueType')

Diff for: tests/test_primitives/test_reawaitable/test_reawaitable_concurrency.py

+8-4
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)