Fixing circular import
This commit is contained in:
@@ -6,7 +6,6 @@ import os
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
from src.utils.logger import get_logger
|
from src.utils.logger import get_logger
|
||||||
from src.utils.image import Image
|
|
||||||
|
|
||||||
|
|
||||||
logger = get_logger(__name__)
|
logger = get_logger(__name__)
|
||||||
@@ -29,6 +28,8 @@ def get_image_files(
|
|||||||
List of absolute paths to image files
|
List of absolute paths to image files
|
||||||
"""
|
"""
|
||||||
if allowed_extensions is None:
|
if allowed_extensions is None:
|
||||||
|
from src.utils.image import Image
|
||||||
|
|
||||||
allowed_extensions = Image.SUPPORTED_EXTENSIONS
|
allowed_extensions = Image.SUPPORTED_EXTENSIONS
|
||||||
|
|
||||||
# Normalize extensions to lowercase
|
# Normalize extensions to lowercase
|
||||||
@@ -205,6 +206,8 @@ def is_image_file(
|
|||||||
True if file is an image
|
True if file is an image
|
||||||
"""
|
"""
|
||||||
if allowed_extensions is None:
|
if allowed_extensions is None:
|
||||||
|
from src.utils.image import Image
|
||||||
|
|
||||||
allowed_extensions = Image.SUPPORTED_EXTENSIONS
|
allowed_extensions = Image.SUPPORTED_EXTENSIONS
|
||||||
|
|
||||||
extension = Path(file_path).suffix.lower()
|
extension = Path(file_path).suffix.lower()
|
||||||
|
|||||||
Reference in New Issue
Block a user