From 8366f375cf07b5138a343282a5e3372ac3ae46c2 Mon Sep 17 00:00:00 2001
From: dcarron <daniel.carron@idiap.ch>
Date: Fri, 26 Apr 2024 12:28:37 +0200
Subject: [PATCH] [rawdataloader] Better typing for specialized RawDataLoaders

---
 src/mednet/libs/classification/data/typing.py | 2 +-
 src/mednet/libs/segmentation/data/typing.py   | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/mednet/libs/classification/data/typing.py b/src/mednet/libs/classification/data/typing.py
index 8cd21405..b504f846 100644
--- a/src/mednet/libs/classification/data/typing.py
+++ b/src/mednet/libs/classification/data/typing.py
@@ -9,7 +9,7 @@ class ClassificationRawDataLoader(RawDataLoader):
     def __init__(self):
         super().__init__()
 
-    def sample(self, _: typing.Any) -> Sample:
+    def sample(self, _: tuple[str, int, typing.Any | None]) -> Sample:
         """Load whole samples from media.
 
         Parameters
diff --git a/src/mednet/libs/segmentation/data/typing.py b/src/mednet/libs/segmentation/data/typing.py
index e1d95cdb..b18b712f 100644
--- a/src/mednet/libs/segmentation/data/typing.py
+++ b/src/mednet/libs/segmentation/data/typing.py
@@ -1,5 +1,3 @@
-import typing
-
 from mednet.libs.common.data.typing import RawDataLoader, Sample
 
 
@@ -9,7 +7,7 @@ class SegmentationRawDataLoader(RawDataLoader):
     def __init__(self):
         super().__init__()
 
-    def sample(self, _: typing.Any) -> Sample:
+    def sample(self, _: tuple[str, str, str | None]) -> Sample:
         """Load whole samples from media.
 
         Parameters
-- 
GitLab