From 0adcbbf3f9ad7c76301798df39c2feecc12b3f50 Mon Sep 17 00:00:00 2001 From: cakester Date: Sun, 20 Nov 2022 11:58:33 -0500 Subject: [PATCH] Add type hint for patch_filter.py (#1158) Co-authored-by: Yang Ding --- ivadomed/loader/patch_filter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ivadomed/loader/patch_filter.py b/ivadomed/loader/patch_filter.py index 26c6960f9..a3c9afaaa 100644 --- a/ivadomed/loader/patch_filter.py +++ b/ivadomed/loader/patch_filter.py @@ -28,13 +28,13 @@ class PatchFilter(object): def __init__(self, filter_empty_mask: bool = False, filter_absent_class: bool = False, filter_empty_input: bool = False, - is_train: bool = False): + is_train: bool = False) -> None: self.filter_empty_mask = filter_empty_mask self.filter_absent_class = filter_absent_class self.filter_empty_input = filter_empty_input self.is_train = is_train - def __call__(self, sample: dict): + def __call__(self, sample: dict) -> bool: """Extract input_data and gt_data lists from sample dict and discard them if they don't match certain conditions.