mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
moved imports to top level (#27683)
This commit is contained in:
parent
b4a73fa87e
commit
0463349f02
@ -1,17 +1,19 @@
|
||||
"""Component that will help set the Dlib face detect processing."""
|
||||
import logging
|
||||
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
|
||||
from homeassistant.components.image_processing import PLATFORM_SCHEMA # noqa
|
||||
from homeassistant.components.image_processing import (
|
||||
ImageProcessingFaceEntity,
|
||||
CONF_SOURCE,
|
||||
CONF_ENTITY_ID,
|
||||
CONF_NAME,
|
||||
)
|
||||
from homeassistant.core import split_entity_id
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@ -55,7 +57,6 @@ class DlibFaceDetectEntity(ImageProcessingFaceEntity):
|
||||
|
||||
def process_image(self, image):
|
||||
"""Process image."""
|
||||
import face_recognition # pylint: disable=import-error
|
||||
|
||||
fak_file = io.BytesIO(image)
|
||||
fak_file.name = "snapshot.jpg"
|
||||
|
Loading…
x
Reference in New Issue
Block a user