From c4df0e0ae8f0980f509b09a7c2ba4014cceff2cc Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 18 Sep 2022 18:57:10 +0200 Subject: Format --- text_recognizer/image_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'text_recognizer') diff --git a/text_recognizer/image_utils.py b/text_recognizer/image_utils.py index 0faed79..fcb094c 100644 --- a/text_recognizer/image_utils.py +++ b/text_recognizer/image_utils.py @@ -4,8 +4,8 @@ from io import BytesIO from pathlib import Path from typing import Any, Union -from PIL import Image import smart_open +from PIL import Image def read_image_pil(image_uri: Union[Path, str], grayscale: bool = False) -> Image: @@ -14,7 +14,7 @@ def read_image_pil(image_uri: Union[Path, str], grayscale: bool = False) -> Imag return read_image_pil_file(image_file, grayscale) -def read_image_pil_file(image_file: Any, grayscale: bool = False) -> Image: +def read_image_pil_file(image_file: str, grayscale: bool = False) -> Image: """Return PIL image.""" with Image.open(image_file) as image: if grayscale: -- cgit v1.2.3-70-g09d2