Enable Ruff PYI036 (#115228)
This commit is contained in:
parent
f114ebd79d
commit
cbbadf6256
2 changed files with 18 additions and 19 deletions
|
@ -39,9 +39,9 @@ class _GlobalFreezeContext:
|
|||
|
||||
async def __aexit__(
|
||||
self,
|
||||
exc_type: type[BaseException],
|
||||
exc_val: BaseException,
|
||||
exc_tb: TracebackType,
|
||||
exc_type: type[BaseException] | None,
|
||||
exc_val: BaseException | None,
|
||||
exc_tb: TracebackType | None,
|
||||
) -> bool | None:
|
||||
self._exit()
|
||||
return None
|
||||
|
@ -52,9 +52,9 @@ class _GlobalFreezeContext:
|
|||
|
||||
def __exit__(
|
||||
self,
|
||||
exc_type: type[BaseException],
|
||||
exc_val: BaseException,
|
||||
exc_tb: TracebackType,
|
||||
exc_type: type[BaseException] | None,
|
||||
exc_val: BaseException | None,
|
||||
exc_tb: TracebackType | None,
|
||||
) -> bool | None:
|
||||
self._loop.call_soon_threadsafe(self._exit)
|
||||
return None
|
||||
|
@ -107,9 +107,9 @@ class _ZoneFreezeContext:
|
|||
|
||||
async def __aexit__(
|
||||
self,
|
||||
exc_type: type[BaseException],
|
||||
exc_val: BaseException,
|
||||
exc_tb: TracebackType,
|
||||
exc_type: type[BaseException] | None,
|
||||
exc_val: BaseException | None,
|
||||
exc_tb: TracebackType | None,
|
||||
) -> bool | None:
|
||||
self._exit()
|
||||
return None
|
||||
|
@ -120,9 +120,9 @@ class _ZoneFreezeContext:
|
|||
|
||||
def __exit__(
|
||||
self,
|
||||
exc_type: type[BaseException],
|
||||
exc_val: BaseException,
|
||||
exc_tb: TracebackType,
|
||||
exc_type: type[BaseException] | None,
|
||||
exc_val: BaseException | None,
|
||||
exc_tb: TracebackType | None,
|
||||
) -> bool | None:
|
||||
self._loop.call_soon_threadsafe(self._exit)
|
||||
return None
|
||||
|
@ -171,9 +171,9 @@ class _GlobalTaskContext:
|
|||
|
||||
async def __aexit__(
|
||||
self,
|
||||
exc_type: type[BaseException],
|
||||
exc_val: BaseException,
|
||||
exc_tb: TracebackType,
|
||||
exc_type: type[BaseException] | None,
|
||||
exc_val: BaseException | None,
|
||||
exc_tb: TracebackType | None,
|
||||
) -> bool | None:
|
||||
self._stop_timer()
|
||||
self._manager.global_tasks.remove(self)
|
||||
|
@ -286,9 +286,9 @@ class _ZoneTaskContext:
|
|||
|
||||
async def __aexit__(
|
||||
self,
|
||||
exc_type: type[BaseException],
|
||||
exc_val: BaseException,
|
||||
exc_tb: TracebackType,
|
||||
exc_type: type[BaseException] | None,
|
||||
exc_val: BaseException | None,
|
||||
exc_tb: TracebackType | None,
|
||||
) -> bool | None:
|
||||
self._zone.exit_task(self)
|
||||
self._stop_timer()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue