Skip to content

Commit e3c72e1

Browse files
committed
FIX: Style
1 parent 0f746c0 commit e3c72e1

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

nibabel/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
@pytest.fixture(scope='session', autouse=True)
1010
def legacy_printoptions():
1111
from packaging.version import Version
12+
1213
if Version(np.__version__) >= Version('1.22'):
1314
np.set_printoptions(legacy='1.21')

nibabel/tests/test_spatialimages.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@
1818
from .. import load as top_load
1919
from ..imageclasses import spatial_axes_first
2020
from ..spatialimages import HeaderDataError, SpatialHeader, SpatialImage
21-
from ..testing import (
22-
bytesio_round_trip,
23-
expires,
24-
memmap_after_ufunc,
25-
)
21+
from ..testing import bytesio_round_trip, expires, memmap_after_ufunc
2622
from ..tmpdirs import InTemporaryDirectory
2723

2824

nibabel/tests/test_volumeutils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,8 +744,8 @@ def test_apply_scaling():
744744
# Check float upcast (not the normal numpy scalar rule)
745745
# This is the normal rule - no upcast from Python scalar
746746
# (on NumPy 2.0 it *will* upcast from a np.float64 scalar!)
747-
assert (f32_arr * 1.).dtype == np.float32
748-
assert (f32_arr + 1.).dtype == np.float32
747+
assert (f32_arr * 1.0).dtype == np.float32
748+
assert (f32_arr + 1.0).dtype == np.float32
749749
# The function does upcast though
750750
ret = apply_read_scaling(np.float32(0), np.float64(2))
751751
assert ret.dtype == np.float64

nibabel/tests/test_wrapstruct.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
from numpy.testing import assert_array_equal
3232

3333
from .. import imageglobals
34-
from ..casting import sctypes
3534
from ..batteryrunners import Report
35+
from ..casting import sctypes
3636
from ..spatialimages import HeaderDataError
3737
from ..volumeutils import Recoder, native_code, swapped_code
3838
from ..wrapstruct import LabeledWrapStruct, WrapStruct, WrapStructError

0 commit comments

Comments
 (0)