Skip to content

Commit 7765dde

Browse files
STY: Apply ruff rule RUF100
RUF100 Unused `noqa` directive
1 parent 7963366 commit 7765dde

File tree

6 files changed

+10
-12
lines changed

6 files changed

+10
-12
lines changed

nibabel/casting.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ class CastingError(Exception):
5151
getattr(np, dtype)
5252
for dtype in (
5353
'int8', 'byte', 'int16', 'short', 'int32', 'intc', 'int_', 'int64', 'longlong',
54-
'uint8', 'ubyte', 'uint16', 'ushort', 'uint32', 'uintc', 'uint', 'uint64', 'ulonglong', # noqa: E501
55-
'float16', 'half', 'float32', 'single', 'float64', 'double', 'float96', 'float128', 'longdouble', # noqa: E501
56-
'complex64', 'csingle', 'complex128', 'cdouble', 'complex192', 'complex256', 'clongdouble', # noqa: E501
54+
'uint8', 'ubyte', 'uint16', 'ushort', 'uint32', 'uintc', 'uint', 'uint64', 'ulonglong',
55+
'float16', 'half', 'float32', 'single', 'float64', 'double', 'float96', 'float128', 'longdouble',
56+
'complex64', 'csingle', 'complex128', 'cdouble', 'complex192', 'complex256', 'clongdouble',
5757
# other names of the built-in scalar types
58-
'int_', 'float_', 'complex_', 'bytes_', 'str_', 'bool_', 'datetime64', 'timedelta64', # noqa: E501
58+
'int_', 'float_', 'complex_', 'bytes_', 'str_', 'bool_', 'datetime64', 'timedelta64',
5959
# other
6060
'object_', 'void',
6161
)

nibabel/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,4 @@
108108
109109
.. _Digital Object Identifier: https://en.wikipedia.org/wiki/Digital_object_identifier
110110
.. _zenodo: https://zenodo.org
111-
""" # noqa: E501
111+
"""

nibabel/parrec.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
# copyright and license terms.
77
#
88
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
9-
# Disable line length checking for PAR fragments in module docstring
10-
# noqa: E501
119
"""Read images in PAR/REC format
1210
1311
This is yet another MRI image format generated by Philips scanners. It is an

nibabel/pydicom_compat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
if have_dicom:
4545
# Values not imported by default
4646
import pydicom.values # type: ignore[import-not-found]
47-
from pydicom.dicomio import dcmread as read_file # noqa:F401
48-
from pydicom.sequence import Sequence # noqa:F401
47+
from pydicom.dicomio import dcmread as read_file
48+
from pydicom.sequence import Sequence
4949

5050
tag_for_keyword = pydicom.datadict.tag_for_keyword
5151

nibabel/tests/test_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
get_data_path,
2424
make_datasource,
2525
)
26-
from .test_environment import DATA_KEY, USER_KEY, with_environment # noqa: F401
26+
from .test_environment import DATA_KEY, USER_KEY, with_environment
2727

2828

2929
@pytest.fixture
30-
def with_nimd_env(request, with_environment): # noqa: F811
30+
def with_nimd_env(request, with_environment):
3131
DATA_FUNCS = {}
3232
DATA_FUNCS['home_dir_func'] = nibd.get_nipy_user_dir
3333
DATA_FUNCS['sys_dir_func'] = nibd.get_nipy_system_dir

nibabel/tests/test_scripts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def test_help():
196196
# needs special treatment since depends on fuse module which
197197
# might not be available.
198198
try:
199-
import fuse # noqa: F401
199+
import fuse
200200
except Exception:
201201
continue # do not test this one
202202
code, stdout, stderr = run_command([cmd, '--help'])

0 commit comments

Comments
 (0)