mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +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."""
|
"""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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user