1
0
mirror of https://github.com/ijaric/voice_assistant.git synced 2025-12-18 01:26:18 +00:00

Review fix

This commit is contained in:
2023-09-19 17:16:30 +03:00
parent cb98517f67
commit cf1a29d520
37 changed files with 55 additions and 70 deletions

View File

@@ -33,5 +33,5 @@ def main() -> None:
exit(os.EX_SOFTWARE)
if __name__ == "__main__.py":
if __name__ == "__main__":
main()

View File

@@ -1,7 +1,6 @@
import json
import aiohttp.web as aiohttp_web
import lib.utils.aiohttp as aiohttp_utils

View File

@@ -4,11 +4,10 @@ import logging
import typing
import aiohttp.web as aiohttp_web
import typing_extensions
import lib.api.rest.v1.health as health_handlers
import lib.app.errors as app_errors
import lib.app.settings as app_settings
import typing_extensions
logger = logging.getLogger(__name__)
@@ -103,7 +102,9 @@ class Application:
logger.info("HTTP server has been interrupted")
except BaseException as unexpected_error:
logger.exception("HTTP server failed to start")
raise app_errors.StartServerError("HTTP server failed to start") from unexpected_error
raise app_errors.StartServerError(
"HTTP server failed to start"
) from unexpected_error
async def dispose(self) -> None:
logger.info("Application is shutting down...")
@@ -121,7 +122,9 @@ class Application:
if len(dispose_errors) != 0:
logger.error("Application has shut down with errors")
raise app_errors.DisposeError("Application has shut down with errors, see logs above")
raise app_errors.DisposeError(
"Application has shut down with errors, see logs above"
)
logger.info("Application has successfully shut down")