From b6b35448b002407af7f0507c6bde155af331d2e0 Mon Sep 17 00:00:00 2001 From: Brian Bjarke Jensen Date: Thu, 18 Sep 2025 23:50:36 +0200 Subject: [PATCH] code quality fixes --- .gitea/workflows/sync-annotations.yml | 2 +- scripts/sync_label_studio_annotations.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/sync-annotations.yml b/.gitea/workflows/sync-annotations.yml index 6638a57..2ca408f 100644 --- a/.gitea/workflows/sync-annotations.yml +++ b/.gitea/workflows/sync-annotations.yml @@ -26,7 +26,7 @@ jobs: run: uv sync --all-extras - name: Sync annotations - env: + env: MINIO_ENDPOINT: ${{ vars.MINIO_ENDPOINT }} MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }} MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }} diff --git a/scripts/sync_label_studio_annotations.py b/scripts/sync_label_studio_annotations.py index 74e2dd6..0ab0f3a 100644 --- a/scripts/sync_label_studio_annotations.py +++ b/scripts/sync_label_studio_annotations.py @@ -64,7 +64,7 @@ def convert_label_studio_output(label_studio_output: dict) -> tuple[Annotation, annotation_data[key] = value annotation_data[uncertainty_key] = uncertainty_value # Create the Annotation object - annotation = Annotation(**annotation_data) + annotation = Annotation(**annotation_data) # type: ignore[arg-type] return annotation, job_id @@ -79,7 +79,9 @@ def sync_label_studio_annotations( if not minio_adapter.is_connected: raise ConnectionError("minio_adapter must be connected to MinIO") 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: raise ConnectionError("annotation_repository must be connected to MinIO") # List annotations in repository