Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Discard lazy fields in template type checks #657

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pydra/engine/helpers_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ def template_update_single(
based on the value from inputs_dict
(checking the types of the fields, that have "output_file_template)"
"""
from .specs import File, MultiOutputFile, Directory
from .specs import File, MultiOutputFile, Directory, LazyField

# if input_dict_st with state specific value is not available,
# the dictionary will be created from inputs object
Expand All @@ -642,7 +642,9 @@ def template_update_single(
"has to be a string or Union[str, bool]"
)
inp_val_set = inputs_dict_st[field.name]
if inp_val_set is not attr.NOTHING and not isinstance(inp_val_set, (str, bool)):
if inp_val_set is not attr.NOTHING and not isinstance(
inp_val_set, (str, bool, LazyField)
):
raise Exception(
f"{field.name} has to be str or bool, but {inp_val_set} set"
)
Expand Down