Skip to content

Commit

Permalink
Add type hint for patch_filter.py (#1158)
Browse files Browse the repository at this point in the history
Co-authored-by: Yang Ding <yang.ding@motioncorrect.com>
  • Loading branch information
cakester and dyt811 committed Nov 20, 2022
1 parent 2b26ad2 commit 0adcbbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ivadomed/loader/patch_filter.py
Expand Up @@ -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.
Expand Down

0 comments on commit 0adcbbf

Please sign in to comment.