diff --git a/taskiq/semaphore.py b/taskiq/semaphore.py index b81b582..6207184 100644 --- a/taskiq/semaphore.py +++ b/taskiq/semaphore.py @@ -52,7 +52,7 @@ async def acquire(self, first: bool = False) -> Literal[True]: # noqa: C901 Acquire a semaphore. :param first: acquire ASAP - :raises asyncio.exceptions.CancelledError: task cancelled + :raises asyncio.CancelledError: task cancelled :returns: true """ if not self.locked(): @@ -78,7 +78,7 @@ async def acquire(self, first: bool = False) -> Literal[True]: # noqa: C901 else: self._waiters.remove(fut) - except asyncio.exceptions.CancelledError: + except asyncio.CancelledError: if not fut.cancelled(): self._value += 1 self._wakeup_next()