Skip to content

Commit df08edc

Browse files
committed
return type of Literal[False] to help static analysis
1 parent cddd828 commit df08edc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/async_utils/priority_sem.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ async def __aenter__(self) -> None:
139139
prio = _priority.get()
140140
await self.__acquire(prio)
141141

142-
async def __aexit__(self, *dont_care: object) -> None:
142+
async def __aexit__(self, *dont_care: object) -> t.Literal[False]:
143143
self.__release()
144+
return False
144145

145146
async def __acquire(self, priority: int, /) -> bool:
146147
if not self.__locked():

0 commit comments

Comments
 (0)