Skip to content

Commit

Permalink
Merge pull request #1363 from DimitriPapadopoulos/PGH
Browse files Browse the repository at this point in the history
STY: Enforce ruff/pygrep-hooks rules (PGH)
  • Loading branch information
effigies authored Oct 1, 2024
2 parents fcc4b80 + aea7fe7 commit 7963366
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions nibabel/benchmarks/bench_array_to_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"""

import sys
from io import BytesIO # NOQA
from io import BytesIO # noqa: F401

import numpy as np
from numpy.testing import measure

from nibabel.volumeutils import array_to_file # NOQA
from nibabel.volumeutils import array_to_file # noqa: F401

from .butils import print_git_title

Expand Down
2 changes: 1 addition & 1 deletion nibabel/benchmarks/bench_finite_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import numpy as np
from numpy.testing import measure

from nibabel.volumeutils import finite_range # NOQA
from nibabel.volumeutils import finite_range # noqa: F401

from .butils import print_git_title

Expand Down
2 changes: 1 addition & 1 deletion nibabel/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Ignore warning requesting help with nicom
with pytest.warns(UserWarning):
import nibabel.nicom # noqa :401
import nibabel.nicom # noqa: F401


@pytest.fixture(scope='session', autouse=True)
Expand Down
2 changes: 1 addition & 1 deletion nibabel/xmlutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"""Thin layer around xml.etree.ElementTree, to abstract nibabel xml support"""

from io import BytesIO
from xml.etree.ElementTree import Element, SubElement, tostring # noqa
from xml.etree.ElementTree import Element, SubElement, tostring # noqa: F401
from xml.parsers.expat import ParserCreate

from .filebasedimages import FileBasedHeader
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ select = [
"FURB",
"I",
"PERF",
"PGH",
"PIE",
"PLE",
"PT",
Expand Down

0 comments on commit 7963366

Please sign in to comment.