diff --git a/nibabel/benchmarks/bench_array_to_file.py b/nibabel/benchmarks/bench_array_to_file.py index c2bab7e95..2af8b5677 100644 --- a/nibabel/benchmarks/bench_array_to_file.py +++ b/nibabel/benchmarks/bench_array_to_file.py @@ -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 diff --git a/nibabel/benchmarks/bench_finite_range.py b/nibabel/benchmarks/bench_finite_range.py index edd839ce6..957446884 100644 --- a/nibabel/benchmarks/bench_finite_range.py +++ b/nibabel/benchmarks/bench_finite_range.py @@ -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 diff --git a/nibabel/conftest.py b/nibabel/conftest.py index a4f8b6de9..b16a832f2 100644 --- a/nibabel/conftest.py +++ b/nibabel/conftest.py @@ -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) diff --git a/nibabel/xmlutils.py b/nibabel/xmlutils.py index 5d079e117..12fd30f22 100644 --- a/nibabel/xmlutils.py +++ b/nibabel/xmlutils.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 748dc12ce..e865cd009 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -124,6 +124,7 @@ select = [ "FURB", "I", "PERF", + "PGH", "PIE", "PLE", "PT",