Skip to content

Commit f1d3aca

Browse files
committed
replace sum(... start=)
start kwarg new in py3.8
1 parent bf21226 commit f1d3aca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bioimageio/core/prediction_pipeline/_processing.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ def __post_init__(self):
7878

7979
if f.name == "mode":
8080
# 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)
81+
valid_modes = get_args(f.type)
82+
for inner in get_args(f.type):
83+
valid_modes += get_args(inner)
84+
8285
if self.mode not in valid_modes:
8386
raise NotImplementedError(f"Unsupported mode {self.mode} for {self.__class__.__name__}")
8487

0 commit comments

Comments
 (0)