Skip to content

Commit 7963366

Browse files
authored
Merge pull request #1363 from DimitriPapadopoulos/PGH
STY: Enforce ruff/pygrep-hooks rules (PGH)
2 parents fcc4b80 + aea7fe7 commit 7963366

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

nibabel/benchmarks/bench_array_to_file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
"""
1212

1313
import sys
14-
from io import BytesIO # NOQA
14+
from io import BytesIO # noqa: F401
1515

1616
import numpy as np
1717
from numpy.testing import measure
1818

19-
from nibabel.volumeutils import array_to_file # NOQA
19+
from nibabel.volumeutils import array_to_file # noqa: F401
2020

2121
from .butils import print_git_title
2222

nibabel/benchmarks/bench_finite_range.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import numpy as np
1616
from numpy.testing import measure
1717

18-
from nibabel.volumeutils import finite_range # NOQA
18+
from nibabel.volumeutils import finite_range # noqa: F401
1919

2020
from .butils import print_git_title
2121

nibabel/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# Ignore warning requesting help with nicom
77
with pytest.warns(UserWarning):
8-
import nibabel.nicom # noqa :401
8+
import nibabel.nicom # noqa: F401
99

1010

1111
@pytest.fixture(scope='session', autouse=True)

nibabel/xmlutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"""Thin layer around xml.etree.ElementTree, to abstract nibabel xml support"""
1010

1111
from io import BytesIO
12-
from xml.etree.ElementTree import Element, SubElement, tostring # noqa
12+
from xml.etree.ElementTree import Element, SubElement, tostring # noqa: F401
1313
from xml.parsers.expat import ParserCreate
1414

1515
from .filebasedimages import FileBasedHeader

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ select = [
124124
"FURB",
125125
"I",
126126
"PERF",
127+
"PGH",
127128
"PIE",
128129
"PLE",
129130
"PT",

0 commit comments

Comments
 (0)