mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
Проверка 09.02.2025
This commit is contained in:
@@ -132,8 +132,7 @@ class CancelScope(BaseCancelScope):
|
||||
exc_type: type[BaseException] | None,
|
||||
exc_val: BaseException | None,
|
||||
exc_tb: TracebackType | None,
|
||||
) -> bool | None:
|
||||
# https://github.com/python-trio/trio-typing/pull/79
|
||||
) -> bool:
|
||||
return self.__original.__exit__(exc_type, exc_val, exc_tb)
|
||||
|
||||
def cancel(self) -> None:
|
||||
@@ -186,9 +185,10 @@ class TaskGroup(abc.TaskGroup):
|
||||
exc_type: type[BaseException] | None,
|
||||
exc_val: BaseException | None,
|
||||
exc_tb: TracebackType | None,
|
||||
) -> bool | None:
|
||||
) -> bool:
|
||||
try:
|
||||
return await self._nursery_manager.__aexit__(exc_type, exc_val, exc_tb)
|
||||
# trio.Nursery.__exit__ returns bool; .open_nursery has wrong type
|
||||
return await self._nursery_manager.__aexit__(exc_type, exc_val, exc_tb) # type: ignore[return-value]
|
||||
except BaseExceptionGroup as exc:
|
||||
if not exc.split(trio.Cancelled)[1]:
|
||||
raise trio.Cancelled._create() from exc
|
||||
|
Reference in New Issue
Block a user