Skip to content

Commit debabec

Browse files
author
Ben Cipollini
committed
STY: autoflake on test files.
1 parent ab0adb4 commit debabec

36 files changed

+46
-60
lines changed

nibabel/freesurfer/mghformat.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ class MGHError(Exception):
6868
To be raised whenever MGH is not happy, or we are not happy with
6969
MGH.
7070
"""
71-
pass
7271

7372

7473
class MGHHeader(object):
@@ -225,7 +224,6 @@ def __ne__(self, other):
225224

226225
def check_fix(self):
227226
''' Pass. maybe for now'''
228-
pass
229227

230228
def get_affine(self):
231229
''' Get the affine transform from the header information.

nibabel/freesurfer/tests/test_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def test_geometry():
7070
coords2, faces2 = read_geometry(surf_path)
7171

7272
with open(surf_path, 'rb') as fobj:
73-
magic = np.fromfile(fobj, ">u1", 3)
73+
np.fromfile(fobj, ">u1", 3)
7474
read_create_stamp = fobj.readline().decode().rstrip('\n')
7575

7676
assert_equal(create_stamp, read_create_stamp)

nibabel/freesurfer/tests/test_mghformat.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import os
1212
import io
13-
import gzip
1413

1514
import numpy as np
1615

@@ -134,7 +133,7 @@ def bad_dtype_mgh():
134133
v = np.ones((7, 13, 3, 22)).astype(np.uint16)
135134
# form a MGHImage object using data
136135
# and the default affine matrix (Note the "None")
137-
img = MGHImage(v, None)
136+
MGHImage(v, None)
138137

139138

140139
def test_bad_dtype_mgh():

nibabel/gifti/tests/test_gifti.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from nibabel.gifti import (GiftiImage, GiftiDataArray, GiftiLabel,
1010
GiftiLabelTable, GiftiMetaData)
1111
from nibabel.gifti.gifti import data_tag
12-
from nibabel.nifti1 import data_type_codes, intent_codes
12+
from nibabel.nifti1 import data_type_codes
1313

1414
from numpy.testing import (assert_array_almost_equal,
1515
assert_array_equal)
@@ -179,7 +179,7 @@ def assign_metadata(val):
179179

180180

181181
def test_data_tag_deprecated():
182-
img = GiftiImage()
182+
GiftiImage()
183183
with clear_and_catch_warnings() as w:
184184
warnings.filterwarnings('once', category=DeprecationWarning)
185185
data_tag(np.array([]), 'ASCII', '%i', 1)

nibabel/gifti/tests/test_giftiio.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class TestGiftiIO(object):
2323
def setUp(self):
2424
with clear_and_catch_warnings() as w:
2525
warnings.simplefilter('always', DeprecationWarning)
26-
import nibabel.gifti.giftiio
2726
assert_equal(len(w), 1)
2827

2928

@@ -32,5 +31,5 @@ def test_read_deprecated():
3231
warnings.simplefilter('always', DeprecationWarning)
3332
from nibabel.gifti.giftiio import read
3433

35-
img = read(DATA_FILE1)
34+
read(DATA_FILE1)
3635
assert_equal(len(w), 1)

nibabel/gifti/tests/test_parse_gifti_fast.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from nibabel.nifti1 import xform_codes
2222
from nibabel.tmpdirs import InTemporaryDirectory
2323

24-
from numpy.testing import assert_array_equal, assert_array_almost_equal
24+
from numpy.testing import assert_array_almost_equal
2525

2626
from nose.tools import (assert_true, assert_false, assert_equal,
2727
assert_raises)
@@ -113,7 +113,7 @@ def test_read_ordering():
113113
def test_load_metadata():
114114
for i, dat in enumerate(datafiles):
115115
img = load(dat)
116-
me = img.meta
116+
img.meta
117117
assert_equal(numDA[i], img.numDA)
118118
assert_equal(img.version, '1.0')
119119

nibabel/nicom/tests/test_csareader.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
from nose.tools import (assert_true, assert_false, assert_equal, assert_raises)
1212

13-
from numpy.testing import assert_array_equal, assert_array_almost_equal
1413

1514
from .test_dicomwrappers import (have_dicom, dicom_test,
1615
IO_DATA_PATH, DATA, DATA_FILE)
@@ -109,7 +108,7 @@ def test_csa_params():
109108
assert_equal(b_matrix.shape, (3, 3))
110109
# check (by absence of error) that the B matrix is positive
111110
# semi-definite.
112-
q = dwp.B2q(b_matrix)
111+
dwp.B2q(b_matrix)
113112
b_value = csa.get_b_value(csa_info)
114113
assert_equal(b_value, 1000)
115114
g_vector = csa.get_g_vector(csa_info)

nibabel/nicom/tests/test_structreader.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from nose.tools import (assert_true, assert_false, assert_equal, assert_raises)
99

10-
from numpy.testing import assert_array_equal, assert_array_almost_equal
1110

1211

1312
def test_unpacker():
@@ -17,12 +16,10 @@ def test_unpacker():
1716
if sys.byteorder == 'little':
1817
native_int = le_int
1918
swapped_int = be_int
20-
native_code = '<'
2119
swapped_code = '>'
2220
else:
2321
native_int = be_int
2422
swapped_int = le_int
25-
native_code = '>'
2623
swapped_code = '<'
2724
up_str = Unpacker(s, endian='<')
2825
assert_equal(up_str.read(4), b'1234')

nibabel/nicom/tests/test_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"""
33
import re
44

5-
import numpy as np
65

76
from numpy.testing import (assert_almost_equal,
87
assert_array_equal)

nibabel/tests/test_api_validators.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ class ValidateAPI(with_metaclass(validator2test)):
5151
5252
See :class:`TextValidateSomething` for an example
5353
"""
54-
pass
5554

5655

5756
class TestValidateSomething(ValidateAPI):

0 commit comments

Comments
 (0)