mypy fixed

This commit is contained in:
Brian Bjarke Jensen
2025-09-17 12:04:45 +02:00
parent ee6acc6791
commit 538b26b62f
2 changed files with 14 additions and 4 deletions
@@ -3,6 +3,7 @@
from __future__ import annotations
import os
from io import BytesIO
from typing import TYPE_CHECKING
import structlog
from python_utils import check_env
@@ -11,6 +12,10 @@ from python_repositories.interfaces import (
ConnectionAwareInterface,
)
# Import for mypy type checking only
if TYPE_CHECKING:
from minio import Minio, S3Error
class MinioAdapter(
ContextAwareInterface,
@@ -27,7 +32,7 @@ class MinioAdapter(
def __init__(self) -> None:
# Import here to avoid hard dependency if MinioAdapter is not used
try:
from minio import Minio, S3Error # type: ignore[import]
from minio import Minio, S3Error
except ImportError as e:
raise RuntimeError("MinioAdapter dependencies missing") from e
# Setup logger