moved imports to top level (#27500)

This commit is contained in:
bouni 2019-10-12 21:51:32 +02:00 committed by Paulus Schoutsen
parent 3f9f8eb379
commit 3ca74373d3
2 changed files with 4 additions and 3 deletions

View file

@ -4,6 +4,8 @@ from datetime import timedelta
import logging import logging
from typing import List from typing import List
import pybbox
import voluptuous as vol import voluptuous as vol
from homeassistant.components.device_tracker import ( from homeassistant.components.device_tracker import (
@ -75,8 +77,6 @@ class BboxDeviceScanner(DeviceScanner):
""" """
_LOGGER.info("Scanning...") _LOGGER.info("Scanning...")
import pybbox
box = pybbox.Bbox(ip=self.host) box = pybbox.Bbox(ip=self.host)
result = box.get_all_connected_devices() result = box.get_all_connected_devices()

View file

@ -3,6 +3,8 @@ import logging
from datetime import timedelta from datetime import timedelta
import requests import requests
import pybbox
import voluptuous as vol import voluptuous as vol
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
@ -136,7 +138,6 @@ class BboxData:
@Throttle(MIN_TIME_BETWEEN_UPDATES) @Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self): def update(self):
"""Get the latest data from the Bbox.""" """Get the latest data from the Bbox."""
import pybbox
try: try:
box = pybbox.Bbox() box = pybbox.Bbox()