mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
moved imports to top level (#27693)
This commit is contained in:
parent
3e26b49cc2
commit
0e5f24d60c
@ -2,6 +2,8 @@
|
||||
import logging
|
||||
import io
|
||||
|
||||
# pylint: disable=import-error
|
||||
import face_recognition
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.core import split_entity_id
|
||||
@ -49,8 +51,6 @@ class DlibFaceIdentifyEntity(ImageProcessingFaceEntity):
|
||||
|
||||
def __init__(self, camera_entity, faces, name, tolerance):
|
||||
"""Initialize Dlib face identify entry."""
|
||||
# pylint: disable=import-error
|
||||
import face_recognition
|
||||
|
||||
super().__init__()
|
||||
|
||||
@ -83,8 +83,6 @@ class DlibFaceIdentifyEntity(ImageProcessingFaceEntity):
|
||||
|
||||
def process_image(self, image):
|
||||
"""Process image."""
|
||||
# pylint: disable=import-error
|
||||
import face_recognition
|
||||
|
||||
fak_file = io.BytesIO(image)
|
||||
fak_file.name = "snapshot.jpg"
|
||||
|
Loading…
x
Reference in New Issue
Block a user