moved imports to top level (#27683)

This commit is contained in:
bouni 2019-10-15 12:28:24 +02:00 committed by Pascal Vizeli
parent b4a73fa87e
commit 0463349f02

View File

@ -1,17 +1,19 @@
"""Component that will help set the Dlib face detect processing.""" """Component that will help set the Dlib face detect processing."""
import logging
import io import io
import logging
from homeassistant.core import split_entity_id import face_recognition # pylint: disable=import-error
from homeassistant.components.image_processing import (
CONF_ENTITY_ID,
CONF_NAME,
CONF_SOURCE,
ImageProcessingFaceEntity,
)
# pylint: disable=unused-import # pylint: disable=unused-import
from homeassistant.components.image_processing import PLATFORM_SCHEMA # noqa from homeassistant.components.image_processing import PLATFORM_SCHEMA # noqa
from homeassistant.components.image_processing import ( from homeassistant.core import split_entity_id
ImageProcessingFaceEntity,
CONF_SOURCE,
CONF_ENTITY_ID,
CONF_NAME,
)
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
@ -55,7 +57,6 @@ class DlibFaceDetectEntity(ImageProcessingFaceEntity):
def process_image(self, image): def process_image(self, image):
"""Process image.""" """Process image."""
import face_recognition # pylint: disable=import-error
fak_file = io.BytesIO(image) fak_file = io.BytesIO(image)
fak_file.name = "snapshot.jpg" fak_file.name = "snapshot.jpg"