Skip to content

Commit 093af8c

Browse files
committed
Disallow blanket and unused suppressions (PGH, RUF10)
1 parent c032a5b commit 093af8c

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

ruff.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ extend-select = [
1919
"FA", # flake8-future-annotations
2020
"I", # isort
2121
"PERF", # Perflint
22+
"PGH", # pygrep-hooks (blanket-* rules)
2223
"PYI", # flake8-pyi
24+
"RUF10", # unused-noqa & redirected-noqa
2325
"TRY", # tryceratops
2426
"UP", # pyupgrade
2527
"YTT", # flake8-2020

setuptools/_distutils/compat/py38.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def removeprefix(self, prefix):
2626

2727
def aix_platform(osname, version, release):
2828
try:
29-
import _aix_support # type: ignore
29+
import _aix_support
3030

3131
return _aix_support.aix_platform()
3232
except ImportError:

setuptools/tests/config/test_apply_pyprojecttoml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from ini2toml.api import LiteTranslator
1818
from packaging.metadata import Metadata
1919

20-
import setuptools # noqa ensure monkey patch to metadata
20+
import setuptools # noqa: F401 # ensure monkey patch to metadata
2121
from setuptools.command.egg_info import write_requirements
2222
from setuptools.config import expand, pyprojecttoml, setupcfg
2323
from setuptools.config._apply_pyprojecttoml import _MissingDynamic, _some_attrgetter

0 commit comments

Comments
 (0)