mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Enable Ruff PYI036 (#115228)
This commit is contained in:
parent
f114ebd79d
commit
cbbadf6256
@ -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()
|
||||
|
@ -722,7 +722,6 @@ ignore = [
|
||||
# temporarily disabled
|
||||
"PT019",
|
||||
"PYI024", # Use typing.NamedTuple instead of collections.namedtuple
|
||||
"PYI036",
|
||||
"PYI041",
|
||||
"RET503",
|
||||
"RET502",
|
||||
|
Loading…
x
Reference in New Issue
Block a user