Skip to content

Commit 1e14998

Browse files
STY: Further simplification
Co-authored-by: Chris Markiewicz <[email protected]>
1 parent 23cb5c7 commit 1e14998

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

nibabel/tests/test_nifti1.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,7 @@ def test_slice_times(self):
538538
hdr.set_slice_duration(0.1)
539539
# We need a function to print out the Nones and floating point
540540
# values in a predictable way, for the tests below.
541-
_stringer = lambda val: (val is not None and f'{val:2.1f}') or None
542-
_print_me = lambda s: list(map(_stringer, s))
541+
_print_me = lambda s: [val if val is None else f'{val:2.1f}' for val in s]
543542
# The following examples are from the nifti1.h documentation.
544543
hdr['slice_code'] = slice_order_codes['sequential increasing']
545544
assert _print_me(hdr.get_slice_times()) == [

0 commit comments

Comments
 (0)