Ignore type error.
This commit is contained in:
@@ -86,9 +86,9 @@ def convert_image(image_path: Path) -> io.BytesIO:
|
|||||||
img.thumbnail(max_image_size, Image.Resampling.LANCZOS)
|
img.thumbnail(max_image_size, Image.Resampling.LANCZOS)
|
||||||
img_byte_arr = io.BytesIO()
|
img_byte_arr = io.BytesIO()
|
||||||
img.save(img_byte_arr, format="JPEG", optimize=True, quality=target_quality)
|
img.save(img_byte_arr, format="JPEG", optimize=True, quality=target_quality)
|
||||||
img_byte_arr.seek(0)
|
img_byte_arr = img_byte_arr.getvalue() # type: ignore[assignment]
|
||||||
|
|
||||||
return img_byte_arr
|
return img_byte_arr # type: ignore[return-value]
|
||||||
|
|
||||||
|
|
||||||
def generate_epub(
|
def generate_epub(
|
||||||
|
|||||||
Reference in New Issue
Block a user