gifn-apply: use Ruff 0.2.2: ruff.lint, "no self"
Push some of the Ruff configuration settings into the ruff.lint tree.
Drop an override for a deprecated check.
Ruff: ANN101
Change-Id: Ic2872f8e59c172c070a55f89346a4fb1699d901f
diff --git a/tools/git-if-needed/python/config/ruff-all/pyproject.toml b/tools/git-if-needed/python/config/ruff-all/pyproject.toml
index 4efbc47..280a424 100644
--- a/tools/git-if-needed/python/config/ruff-all/pyproject.toml
+++ b/tools/git-if-needed/python/config/ruff-all/pyproject.toml
@@ -3,4 +3,6 @@
[tool.ruff]
extend = "../ruff-base/pyproject.toml"
+
+[tool.ruff.lint]
select = ["ALL"]
diff --git a/tools/git-if-needed/python/config/ruff-base/pyproject.toml b/tools/git-if-needed/python/config/ruff-base/pyproject.toml
index 8e8d3e7..3a363c0 100644
--- a/tools/git-if-needed/python/config/ruff-base/pyproject.toml
+++ b/tools/git-if-needed/python/config/ruff-base/pyproject.toml
@@ -5,11 +5,10 @@
target-version = "py38"
line-length = 100
preview = true
+
+[tool.ruff.lint]
select = []
ignore = [
- # We know what "self" is, we hope
- "ANN101",
-
# This is our style
"D203",
"D213",
@@ -24,15 +23,15 @@
"TRY003",
]
-[tool.ruff.flake8-copyright]
+[tool.ruff.lint.flake8-copyright]
notice-rgx = "(?x) SPDX-FileCopyrightText: \\s \\S"
-[tool.ruff.isort]
+[tool.ruff.lint.isort]
force-single-line = true
known-first-party = ["gifn_apply"]
lines-after-imports = 2
single-line-exclusions = ["typing"]
-[tool.ruff.per-file-ignores]
+[tool.ruff.lint.per-file-ignores]
# This is a test suite
"tests/unit/*" = ["S101"]
diff --git a/tools/git-if-needed/python/requirements/ruff.txt b/tools/git-if-needed/python/requirements/ruff.txt
index b86f19e..dc5c68c 100644
--- a/tools/git-if-needed/python/requirements/ruff.txt
+++ b/tools/git-if-needed/python/requirements/ruff.txt
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: StorPool <support@storpool.com>
# SPDX-License-Identifier: BSD-2-Clause
-ruff == 0.1.15
+ruff == 0.2.2