From 1846b45cb58b04a4db95a3bd84289e875c9295ec Mon Sep 17 00:00:00 2001 From: springstan <46536646+springstan@users.noreply.github.com> Date: Thu, 5 Dec 2019 16:59:31 +0100 Subject: [PATCH] Move imports to top for mobile_app (#29511) --- homeassistant/components/mobile_app/helpers.py | 2 +- homeassistant/components/mobile_app/http_api.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/mobile_app/helpers.py b/homeassistant/components/mobile_app/helpers.py index cad25f371dd..400ff31be89 100644 --- a/homeassistant/components/mobile_app/helpers.py +++ b/homeassistant/components/mobile_app/helpers.py @@ -111,7 +111,7 @@ def error_response( def supports_encryption() -> bool: """Test if we support encryption.""" try: - import nacl # noqa: F401 pylint: disable=unused-import + import nacl # noqa: F401 pylint: disable=unused-import, import-outside-toplevel return True except OSError: diff --git a/homeassistant/components/mobile_app/http_api.py b/homeassistant/components/mobile_app/http_api.py index 5be2d19789e..ede18528f81 100644 --- a/homeassistant/components/mobile_app/http_api.py +++ b/homeassistant/components/mobile_app/http_api.py @@ -6,7 +6,6 @@ from aiohttp.web import Request, Response from nacl.secret import SecretBox from homeassistant.auth.util import generate_secret - from homeassistant.components.http import HomeAssistantView from homeassistant.components.http.data_validator import RequestDataValidator from homeassistant.const import CONF_WEBHOOK_ID, HTTP_CREATED