Skip to content

Commit b0c51c1

Browse files
committed
relaxed restriction on fields with output_file_template to allow str or union[str, bool] in addition to Path union[Path, bool] (would be nice to reintroduce this)
1 parent e4e7cb0 commit b0c51c1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pydra/engine/specs.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,12 @@ def check_metadata(self):
376376
)
377377
# assuming that fields with output_file_template shouldn't have default
378378
if mdata.get("output_file_template"):
379-
if fld.type not in (Path, ty.Union[Path, bool]):
379+
if fld.type not in (
380+
Path,
381+
ty.Union[Path, bool],
382+
str,
383+
ty.Union[str, bool],
384+
):
380385
raise TypeError(
381386
f"Type of '{fld.name}' should be either pathlib.Path or "
382387
f"typing.Union[pathlib.Path, bool] (not {fld.type}) because "

0 commit comments

Comments
 (0)