Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 13, 2023
1 parent ca2d56c commit 885e538
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion pydra/engine/helpers_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,8 @@ def template_update(inputs, output_dir, state_ind=None, map_copyfiles=None):

# Collect templated inputs for which all requirements are satisfied.
fields_templ = [
field for field in attr_fields(inputs)
field
for field in attr_fields(inputs)
if field.metadata.get("output_file_template")
and all(
[
Expand Down
8 changes: 5 additions & 3 deletions pydra/engine/tests/test_shelltask_inputspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,7 @@ def test_shell_cmd_inputs_template_requires_1():
attr.ib(
type=bool,
metadata={"help_string": "enable template"},
)
),
),
(
"out_file",
Expand All @@ -1763,7 +1763,9 @@ def test_shell_cmd_inputs_template_requires_1():
)

# When requirements are not met.
shelly = ShellCommandTask(executable="cmd", input_spec=my_input_spec, in_file="in.file")
shelly = ShellCommandTask(
executable="cmd", input_spec=my_input_spec, in_file="in.file"
)
assert "--tpl" not in shelly.cmdline

# When requirements are met.
Expand Down Expand Up @@ -2139,7 +2141,7 @@ def test_shell_cmd_inputs_di(tmpdir, use_validator):
)
assert (
shelly.cmdline == f"DenoiseImage -i {tmpdir.join('a_file.ext')} -s 1 -p 1 -r 2 "
f"-o [{str(shelly.output_dir / 'a_file_out.ext')}, {str(shelly.output_dir / 'a_file_noise.ext')}]"
f"-o [{str(shelly.output_dir / 'a_file_out.ext')}, {str(shelly.output_dir / 'a_file_noise.ext')}]"
)

# input file name and help_short
Expand Down

0 comments on commit 885e538

Please sign in to comment.