Skip to content

Commit 6696caa

Browse files
committed
fix: remove NotImplementedError check
1 parent 967c373 commit 6696caa

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

nitransforms/cli.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ def cli_apply(pargs):
2929
"Cannot determine transformation format, manually set format with the `--fmt` flag"
3030
)
3131

32-
if pargs.nonlinear:
33-
xfm = nlinload(pargs.transform, fmt=fmt)
34-
else:
35-
xfm = linload(pargs.transform, fmt=fmt)
32+
xfm = (
33+
nlinload(pargs.transform, fmt=fmt)
34+
if pargs.nonlinear else
35+
linload(pargs.transform, fmt=fmt)
36+
)
3637

3738
# ensure a reference is set
3839
xfm.reference = pargs.ref or pargs.moving

nitransforms/tests/test_cli.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,7 @@ def test_apply_nl(tmpdir, testdata_path):
5757
with pytest.raises(ValueError):
5858
ntcli(nlargs)
5959

60-
nlargs.extend(["--fmt", "afni"])
61-
# no linear afni support
62-
with pytest.raises(NotImplementedError):
63-
ntcli(nlargs)
64-
6560
output = "moved_from_warp.nii.gz"
66-
nlargs.extend(["--nonlinear", "--out", output])
61+
nlargs.extend(["--nonlinear", "--fmt", "afni", "--out", output])
6762
ntcli(nlargs)
6863
assert (tmpdir / output).check()

0 commit comments

Comments
 (0)