Fix linter error (#7428)

This commit is contained in:
Nicolas Mowen 2023-08-10 04:49:11 -06:00 committed by GitHub
parent fbed3fbb8b
commit afe3b5dd3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,7 @@ def get_jpg_bytes(image: ndarray, max_dim: int, quality: int) -> bytes:
ret, jpg = cv2.imencode(".jpg", original, [int(cv2.IMWRITE_JPEG_QUALITY), quality]) ret, jpg = cv2.imencode(".jpg", original, [int(cv2.IMWRITE_JPEG_QUALITY), quality])
jpg_bytes = jpg.tobytes() jpg_bytes = jpg.tobytes()
return jpg_bytes if type(jpg_bytes) is bytes else b"" return jpg_bytes if isinstance(jpg_bytes, bytes) else b""
class PlusApi: class PlusApi: