We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf21226 commit f1d3acaCopy full SHA for f1d3aca
bioimageio/core/prediction_pipeline/_processing.py
@@ -78,7 +78,10 @@ def __post_init__(self):
78
79
if f.name == "mode":
80
# mode is always annotated as literals (or literals of literals)
81
- valid_modes = sum([get_args(inner) for inner in get_args(f.type)], start=tuple()) + get_args(f.type)
+ valid_modes = get_args(f.type)
82
+ for inner in get_args(f.type):
83
+ valid_modes += get_args(inner)
84
+
85
if self.mode not in valid_modes:
86
raise NotImplementedError(f"Unsupported mode {self.mode} for {self.__class__.__name__}")
87
0 commit comments