Skip to content

Commit a1206af

Browse files
committed
Fix code style: reduce try-except body length (WPS229)
1 parent 2d8ae80 commit a1206af

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

returns/primitives/reawaitable.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44

55
# Try to use anyio.Lock, fall back to asyncio.Lock
66
try:
7-
import anyio
8-
Lock = anyio.Lock
7+
import anyio # noqa: WPS433
98
except ImportError:
10-
import asyncio
9+
import asyncio # noqa: WPS433
1110
Lock = asyncio.Lock
11+
else:
12+
Lock = anyio.Lock
1213

1314
_ValueType = TypeVar('_ValueType')
1415
_AwaitableT = TypeVar('_AwaitableT', bound=Awaitable)

0 commit comments

Comments
 (0)