Amend typing

This commit is contained in:
Andrea Lanfranchi 2024-02-22 12:41:21 +01:00
parent 63079d3095
commit 9dc0040a12
No known key found for this signature in database
GPG Key ID: 2D623A60BB279915

View File

@ -297,7 +297,7 @@ def find(
return resp_obj return resp_obj
def __list_images(path: str) -> list[str]: def __list_images(path: str) -> List[str]:
""" """
List images in a given path List images in a given path
Args: Args:
@ -305,7 +305,7 @@ def __list_images(path: str) -> list[str]:
Returns: Returns:
images (list): list of exact image paths images (list): list of exact image paths
""" """
images = list[str]() images = []
pattern = re.compile(r".*\.(jpg|jpeg|png)$", re.IGNORECASE) pattern = re.compile(r".*\.(jpg|jpeg|png)$", re.IGNORECASE)
for file_name in os.listdir(path): for file_name in os.listdir(path):
if pattern.match(file_name): if pattern.match(file_name):