Move imports to top for point (#29470)

This commit is contained in:
springstan 2019-12-05 06:12:09 +01:00 committed by Paulus Schoutsen
parent 96cf20ad81
commit 43665466f5
2 changed files with 2 additions and 3 deletions

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")

View File

@ -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]