mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-28 20:18:06 +00:00
Enable mypy part 1 (addons and api) (#5759)
* Fix mypy issues in addons * Fix mypy issues in api * fix docstring * Brackets instead of get with default
This commit is contained in:
@@ -230,19 +230,12 @@ class APISupervisor(CoreSysAttributes):
|
||||
await asyncio.shield(self.sys_supervisor.update(version))
|
||||
|
||||
@api_process
|
||||
def reload(self, request: web.Request) -> Awaitable[None]:
|
||||
def reload(self, request: web.Request) -> Awaitable:
|
||||
"""Reload add-ons, configuration, etc."""
|
||||
return asyncio.shield(
|
||||
asyncio.wait(
|
||||
[
|
||||
self.sys_create_task(coro)
|
||||
for coro in [
|
||||
self.sys_updater.reload(),
|
||||
self.sys_homeassistant.secrets.reload(),
|
||||
self.sys_resolution.evaluate.evaluate_system(),
|
||||
]
|
||||
]
|
||||
)
|
||||
return asyncio.gather(
|
||||
asyncio.shield(self.sys_updater.reload()),
|
||||
asyncio.shield(self.sys_homeassistant.secrets.reload()),
|
||||
asyncio.shield(self.sys_resolution.evaluate.evaluate_system()),
|
||||
)
|
||||
|
||||
@api_process
|
||||
|
||||
Reference in New Issue
Block a user