code quality fixes
Code Quality Pipeline / code-quality (pull_request) Successful in 37s
Test Python Package / test (pull_request) Successful in 31s

This commit is contained in:
Brian Bjarke Jensen
2025-09-18 23:50:36 +02:00
parent 28abd22571
commit b6b35448b0
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
run: uv sync --all-extras run: uv sync --all-extras
- name: Sync annotations - name: Sync annotations
env: env:
MINIO_ENDPOINT: ${{ vars.MINIO_ENDPOINT }} MINIO_ENDPOINT: ${{ vars.MINIO_ENDPOINT }}
MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }} MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }}
MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }} MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }}
+4 -2
View File
@@ -64,7 +64,7 @@ def convert_label_studio_output(label_studio_output: dict) -> tuple[Annotation,
annotation_data[key] = value annotation_data[key] = value
annotation_data[uncertainty_key] = uncertainty_value annotation_data[uncertainty_key] = uncertainty_value
# Create the Annotation object # Create the Annotation object
annotation = Annotation(**annotation_data) annotation = Annotation(**annotation_data) # type: ignore[arg-type]
return annotation, job_id return annotation, job_id
@@ -79,7 +79,9 @@ def sync_label_studio_annotations(
if not minio_adapter.is_connected: if not minio_adapter.is_connected:
raise ConnectionError("minio_adapter must be connected to MinIO") raise ConnectionError("minio_adapter must be connected to MinIO")
if not isinstance(annotation_repository, AnnotationRepository): if not isinstance(annotation_repository, AnnotationRepository):
raise ValueError("annotation_repository must be an instance of AnnotationRepository") raise ValueError(
"annotation_repository must be an instance of AnnotationRepository"
)
if not annotation_repository.is_connected: if not annotation_repository.is_connected:
raise ConnectionError("annotation_repository must be connected to MinIO") raise ConnectionError("annotation_repository must be connected to MinIO")
# List annotations in repository # List annotations in repository