Move imports to top for point (#29470)

This commit is contained in:
springstan authored and Paulus Schoutsen committed 2019-12-04 21:12:09 -08:00
1 parent 96cf20ad81
commit 43665466f5
2 files changed
+2 -3

No files matched your search

+1 -1
View File
@@ -2,6 +2,7 @@
import asyncio
import logging
from pypoint import PointSession
import voluptuous as vol
from homeassistant import config_entries
@@ -71,7 +72,6 @@ async def async_setup(hass, config):
async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
"""Set up Point from a config entry."""
from pypoint import PointSession
def token_saver(token):
_LOGGER.debug("Saving updated token")
@@ -4,6 +4,7 @@ from collections import OrderedDict
import logging
import async_timeout
from pypoint import PointSession
import voluptuous as vol
from homeassistant import config_entries
@@ -109,7 +110,6 @@ class PointFlowHandler(config_entries.ConfigFlow):
async def _get_authorization_url(self):
"""Create Minut Point session and get authorization url."""
from pypoint import PointSession
flow = self.hass.data[DATA_FLOW_IMPL][self.flow_impl]
client_id = flow[CLIENT_ID]
@@ -138,7 +138,6 @@ class PointFlowHandler(config_entries.ConfigFlow):
async def _async_create_session(self, code):
"""Create point session and entries."""
from pypoint import PointSession
flow = self.hass.data[DATA_FLOW_IMPL][DOMAIN]
client_id = flow[CLIENT_ID]