More pylint 2 fixes (#15516)
* Pylint 2 useless-import-alias fixes * Pylint 2 chained-comparison fixes * Pylint 2 consider-using-get fixes * Pylint 2 len-as-condition fixes
This commit is contained in:
parent
058081b1f5
commit
bf17ed0917
104 changed files with 126 additions and 137 deletions
|
@ -103,7 +103,7 @@ class MicrosoftFaceDetectEntity(ImageProcessingFaceEntity):
|
|||
_LOGGER.error("Can't process image on microsoft face: %s", err)
|
||||
return
|
||||
|
||||
if face_data is None or len(face_data) < 1:
|
||||
if not face_data:
|
||||
return
|
||||
|
||||
faces = []
|
||||
|
|
|
@ -90,7 +90,7 @@ class MicrosoftFaceIdentifyEntity(ImageProcessingFaceEntity):
|
|||
face_data = yield from self._api.call_api(
|
||||
'post', 'detect', image, binary=True)
|
||||
|
||||
if face_data is None or len(face_data) < 1:
|
||||
if not face_data:
|
||||
return
|
||||
|
||||
face_ids = [data['faceId'] for data in face_data]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue