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__(
|
async def __aexit__(
|
||||||
self,
|
self,
|
||||||
exc_type: type[BaseException],
|
exc_type: type[BaseException] | None,
|
||||||
exc_val: BaseException,
|
exc_val: BaseException | None,
|
||||||
exc_tb: TracebackType,
|
exc_tb: TracebackType | None,
|
||||||
) -> bool | None:
|
) -> bool | None:
|
||||||
self._exit()
|
self._exit()
|
||||||
return None
|
return None
|
||||||
|
@ -52,9 +52,9 @@ class _GlobalFreezeContext:
|
||||||
|
|
||||||
def __exit__(
|
def __exit__(
|
||||||
self,
|
self,
|
||||||
exc_type: type[BaseException],
|
exc_type: type[BaseException] | None,
|
||||||
exc_val: BaseException,
|
exc_val: BaseException | None,
|
||||||
exc_tb: TracebackType,
|
exc_tb: TracebackType | None,
|
||||||
) -> bool | None:
|
) -> bool | None:
|
||||||
self._loop.call_soon_threadsafe(self._exit)
|
self._loop.call_soon_threadsafe(self._exit)
|
||||||
return None
|
return None
|
||||||
|
@ -107,9 +107,9 @@ class _ZoneFreezeContext:
|
||||||
|
|
||||||
async def __aexit__(
|
async def __aexit__(
|
||||||
self,
|
self,
|
||||||
exc_type: type[BaseException],
|
exc_type: type[BaseException] | None,
|
||||||
exc_val: BaseException,
|
exc_val: BaseException | None,
|
||||||
exc_tb: TracebackType,
|
exc_tb: TracebackType | None,
|
||||||
) -> bool | None:
|
) -> bool | None:
|
||||||
self._exit()
|
self._exit()
|
||||||
return None
|
return None
|
||||||
|
@ -120,9 +120,9 @@ class _ZoneFreezeContext:
|
||||||
|
|
||||||
def __exit__(
|
def __exit__(
|
||||||
self,
|
self,
|
||||||
exc_type: type[BaseException],
|
exc_type: type[BaseException] | None,
|
||||||
exc_val: BaseException,
|
exc_val: BaseException | None,
|
||||||
exc_tb: TracebackType,
|
exc_tb: TracebackType | None,
|
||||||
) -> bool | None:
|
) -> bool | None:
|
||||||
self._loop.call_soon_threadsafe(self._exit)
|
self._loop.call_soon_threadsafe(self._exit)
|
||||||
return None
|
return None
|
||||||
|
@ -171,9 +171,9 @@ class _GlobalTaskContext:
|
||||||
|
|
||||||
async def __aexit__(
|
async def __aexit__(
|
||||||
self,
|
self,
|
||||||
exc_type: type[BaseException],
|
exc_type: type[BaseException] | None,
|
||||||
exc_val: BaseException,
|
exc_val: BaseException | None,
|
||||||
exc_tb: TracebackType,
|
exc_tb: TracebackType | None,
|
||||||
) -> bool | None:
|
) -> bool | None:
|
||||||
self._stop_timer()
|
self._stop_timer()
|
||||||
self._manager.global_tasks.remove(self)
|
self._manager.global_tasks.remove(self)
|
||||||
|
@ -286,9 +286,9 @@ class _ZoneTaskContext:
|
||||||
|
|
||||||
async def __aexit__(
|
async def __aexit__(
|
||||||
self,
|
self,
|
||||||
exc_type: type[BaseException],
|
exc_type: type[BaseException] | None,
|
||||||
exc_val: BaseException,
|
exc_val: BaseException | None,
|
||||||
exc_tb: TracebackType,
|
exc_tb: TracebackType | None,
|
||||||
) -> bool | None:
|
) -> bool | None:
|
||||||
self._zone.exit_task(self)
|
self._zone.exit_task(self)
|
||||||
self._stop_timer()
|
self._stop_timer()
|
||||||
|
|
|
@ -722,7 +722,6 @@ ignore = [
|
||||||
# temporarily disabled
|
# temporarily disabled
|
||||||
"PT019",
|
"PT019",
|
||||||
"PYI024", # Use typing.NamedTuple instead of collections.namedtuple
|
"PYI024", # Use typing.NamedTuple instead of collections.namedtuple
|
||||||
"PYI036",
|
|
||||||
"PYI041",
|
"PYI041",
|
||||||
"RET503",
|
"RET503",
|
||||||
"RET502",
|
"RET502",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue