Skip to content

Commit 7ce84f3

Browse files
committed
FIX: Syntax errors/warnings
1 parent 7c7962b commit 7ce84f3

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

nibabel/nicom/dicomwrappers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class WrapperPrecisionError(WrapperError):
3434

3535

3636
def wrapper_from_file(file_like, *args, **kwargs):
37-
""" Create DICOM wrapper from `file_like` object
37+
r""" Create DICOM wrapper from `file_like` object
3838
3939
Parameters
4040
----------

nisext/tests/test_testers.py

+3-11
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def test_back_tick():
1515
assert back_tick(cmd, ret_err=True) == ("Hello", "")
1616
assert back_tick(cmd, True, False) == (b"Hello", b"")
1717
cmd = f'{PYTHON} -c "raise ValueError()"'
18-
with pytest.raises(RuntimeError)
18+
with pytest.raises(RuntimeError):
1919
back_tick(cmd)
2020

2121

@@ -28,16 +28,8 @@ def test_run_mod_cmd():
2828
mod_file, out_str = [s.strip() for s in sout.split('\n')]
2929
assert mod_file.startswith(mod_dir)
3030
assert out_str == 'Hello again'
31-
sout, serr = run_mod_cmd(mod,
32-
mod_dir,
33-
"print(os.environ['PATH'])",
34-
None,
35-
False)
31+
sout, serr = run_mod_cmd(mod, mod_dir, "print(os.environ['PATH'])", None, False)
3632
assert serr == ''
37-
sout2, serr = run_mod_cmd(mod,
38-
mod_dir,
39-
"print(os.environ['PATH'])",
40-
'pth2',
41-
False)
33+
sout2, serr = run_mod_cmd(mod, mod_dir, "print(os.environ['PATH'])", 'pth2', False)
4234
assert serr == ''
4335
assert sout2 == '"pth2"' + pathsep + sout

0 commit comments

Comments
 (0)