Improve type hints in demo [1/3] (#77180)

This commit is contained in:
epenet
2022-08-29 00:51:10 +02:00
committed by GitHub
parent 575ac5ae0a
commit 7eb8e1f25d
13 changed files with 156 additions and 247 deletions

View File

@@ -39,7 +39,7 @@ class DemoImageProcessingAlpr(ImageProcessingAlprEntity):
"""Initialize demo ALPR image processing entity."""
super().__init__()
self._name = name
self._attr_name = name
self._camera = camera_entity
@property
@@ -52,11 +52,6 @@ class DemoImageProcessingAlpr(ImageProcessingAlprEntity):
"""Return minimum confidence for send events."""
return 80
@property
def name(self) -> str:
"""Return the name of the entity."""
return self._name
def process_image(self, image: Image) -> None:
"""Process image."""
demo_data = {
@@ -76,7 +71,7 @@ class DemoImageProcessingFace(ImageProcessingFaceEntity):
"""Initialize demo face image processing entity."""
super().__init__()
self._name = name
self._attr_name = name
self._camera = camera_entity
@property
@@ -89,11 +84,6 @@ class DemoImageProcessingFace(ImageProcessingFaceEntity):
"""Return minimum confidence for send events."""
return 80
@property
def name(self) -> str:
"""Return the name of the entity."""
return self._name
def process_image(self, image: Image) -> None:
"""Process image."""
demo_data = [