Skip to content

Commit 50bf5c8

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent e6252ee commit 50bf5c8

File tree

4 files changed

+6
-17
lines changed

4 files changed

+6
-17
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
]
2929
},
3030
]
31-
}
31+
}

conftest.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,5 @@ def pytest_exception_interact(call: pytest.CallInfo[ty.Any]) -> None:
1212
raise call.excinfo.value
1313

1414
@pytest.hookimpl(tryfirst=True)
15-
def pytest_internalerror(
16-
excinfo: pytest.ExceptionInfo[BaseException]
17-
) -> None:
15+
def pytest_internalerror(excinfo: pytest.ExceptionInfo[BaseException]) -> None:
1816
raise excinfo.value

pydra/compose/nipype1/builder.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,7 @@ def _run(self, job: "Job[Nipype1Task]", rerun: bool = False) -> None:
176176
for n, v in task_dict(self).items()
177177
if v is not None or fields[n].mandatory
178178
}
179-
node = nipype.Node(
180-
self._interface, base_dir=job.cache_dir, name=type(self).__name__
181-
)
179+
node = nipype.Node(self._interface, base_dir=job.cache_dir, name=type(self).__name__)
182180
node.inputs.trait_set(**inputs)
183181
res = node.run()
184182
job.return_values = res.outputs.get()
@@ -202,9 +200,7 @@ def traitedspec_to_fields(
202200
else:
203201
default = base.NO_DEFAULT
204202
if name in trait_names:
205-
fields[name] = field_type(
206-
name=name, help=trait.desc, type=type_, default=default
207-
)
203+
fields[name] = field_type(name=name, help=trait.desc, type=type_, default=default)
208204
return fields
209205

210206

pydra/compose/nipype1/tests/test_nipype1task.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
def test_isolation(tmp_path):
1212
in_file = tmp_path / "orig/tpms_msk.nii.gz"
1313
in_file.parent.mkdir()
14-
shutil.copyfile(
15-
load_resource("nipype", "testing/data/tpms_msk.nii.gz"),
16-
in_file
17-
)
14+
shutil.copyfile(load_resource("nipype", "testing/data/tpms_msk.nii.gz"), in_file)
1815

1916
out_dir = tmp_path / "output"
2017
out_dir.mkdir()
@@ -33,9 +30,7 @@ def with_tuple(in_param: tuple):
3330
return out_param
3431

3532
tuple_interface = nutil.Function(
36-
input_names=["in_param"],
37-
output_names=["out_param"],
38-
function=with_tuple
33+
input_names=["in_param"], output_names=["out_param"], function=with_tuple
3934
)
4035

4136
TaskTuple = nipype1.define(tuple_interface)

0 commit comments

Comments
 (0)