From 2030f18a49a0e2c5980627ca27aa73bcd1126a92 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 9 May 2023 05:27:42 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pydra/tasks/fsl/utils/split.py | 4 +--- pydra/tasks/fsl/utils/tests/test_run_split.py | 8 ++------ pydra/tasks/fsl/utils/tests/test_spec_split.py | 4 +--- specs/callables.py | 1 + 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/pydra/tasks/fsl/utils/split.py b/pydra/tasks/fsl/utils/split.py index 6f97243..cc001c6 100644 --- a/pydra/tasks/fsl/utils/split.py +++ b/pydra/tasks/fsl/utils/split.py @@ -37,9 +37,7 @@ def Split_output(inputs): }, ), ] -Split_input_spec = specs.SpecInfo( - name="Input", fields=input_fields, bases=(specs.ShellSpec,) -) +Split_input_spec = specs.SpecInfo(name="Input", fields=input_fields, bases=(specs.ShellSpec,)) output_fields = [ ( diff --git a/pydra/tasks/fsl/utils/tests/test_run_split.py b/pydra/tasks/fsl/utils/tests/test_run_split.py index cda7479..970a85e 100644 --- a/pydra/tasks/fsl/utils/tests/test_run_split.py +++ b/pydra/tasks/fsl/utils/tests/test_run_split.py @@ -3,9 +3,7 @@ from ..split import Split -@pytest.mark.xfail( - "FSLDIR" not in os.environ, reason="no FSL found", raises=FileNotFoundError -) +@pytest.mark.xfail("FSLDIR" not in os.environ, reason="no FSL found", raises=FileNotFoundError) @pytest.mark.parametrize( "inputs, outputs", [ @@ -45,9 +43,7 @@ def test_Split(test_data, inputs, outputs): except: pass task = Split(**inputs) - assert set(task.generated_output_names) == set( - ["return_code", "stdout", "stderr"] + outputs - ) + assert set(task.generated_output_names) == set(["return_code", "stdout", "stderr"] + outputs) res = task() print("RESULT: ", res) for out_nm in outputs: diff --git a/pydra/tasks/fsl/utils/tests/test_spec_split.py b/pydra/tasks/fsl/utils/tests/test_spec_split.py index 0b02dc0..af3704b 100644 --- a/pydra/tasks/fsl/utils/tests/test_spec_split.py +++ b/pydra/tasks/fsl/utils/tests/test_spec_split.py @@ -42,6 +42,4 @@ def test_Split(test_data, inputs, outputs): except: pass task = Split(**inputs) - assert set(task.generated_output_names) == set( - ["return_code", "stdout", "stderr"] + outputs - ) + assert set(task.generated_output_names) == set(["return_code", "stdout", "stderr"] + outputs) diff --git a/specs/callables.py b/specs/callables.py index 18ca468..44240cf 100644 --- a/specs/callables.py +++ b/specs/callables.py @@ -403,6 +403,7 @@ def MELODIC_output(field, inputs): # return sorted(glob(fname_template)) + def Split_output(inputs): import os, glob