From: Vincent Fazio <vfazio@gmail.com>
To: linux-gpio@vger.kernel.org
Cc: Vincent Fazio <vfazio@gmail.com>
Subject: [libgpiod][PATCH 9/9] bindings: python: update linter configuration
Date: Tue, 31 Mar 2026 19:14:58 -0500 [thread overview]
Message-ID: <20260401001459.19159-9-vfazio@gmail.com> (raw)
In-Reply-To: <20260401001459.19159-1-vfazio@gmail.com>
Simplify linter configuration to check all files in the bindings
directory while excluding files in .gitignore.
With a minimum mypy version of 1.18.1, the `strict_equality` knob can
be removed as it was a work around a known issue [0] that is now fixed.
With a minimum ruff version of 15.x, rename the TCH check to TC since
it was renamed in v0.8.0 [1].
[0]: https://github.com/python/mypy/issues/10910
[1]: https://github.com/astral-sh/ruff/releases/tag/0.8.0
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
---
bindings/python/pyproject.toml | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml
index 3255e89..98bb44c 100644
--- a/bindings/python/pyproject.toml
+++ b/bindings/python/pyproject.toml
@@ -49,26 +49,13 @@ namespaces = false
[tool.mypy]
python_version = "3.10"
+exclude_gitignore = true
files = [
- "gpiod/",
- "tests/",
-]
-
-[[tool.mypy.overrides]]
-module = "gpiod.line.*"
-strict_equality = false # Ignore Enum comparison-overlap: https://github.com/python/mypy/issues/17317
-
-[tool.ruff]
-target-version = "py310"
-include = [
- "gpiod/**/*.py",
- "gpiod/**/*.pyi",
- "tests/**/*.py",
- "tests/**/*.pyi",
+ ".",
]
[tool.ruff.lint]
-select = ["B", "E", "F", "I", "TCH", "UP"]
+select = ["B", "E", "F", "I", "TC", "UP"]
ignore=[
# Ignore chained exception warnings for now: https://docs.astral.sh/ruff/rules/raise-without-from-inside-except/
"B904",
--
2.43.0
next prev parent reply other threads:[~2026-04-01 0:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 0:14 [libgpiod][PATCH 1/9] bindings: python: build_tests: do not fallback to distutils Vincent Fazio
2026-04-01 0:14 ` [libgpiod][PATCH 2/9] bindings: python: build_tests: simplify the Distribution Vincent Fazio
2026-04-01 0:14 ` [libgpiod][PATCH 3/9] bindings: python: setup: add type annotations Vincent Fazio
2026-04-01 0:14 ` [libgpiod][PATCH 4/9] bindings: python: setup: apply linter recommendations Vincent Fazio
2026-04-01 0:14 ` [libgpiod][PATCH 5/9] bindings: python: setup: use logging module Vincent Fazio
2026-04-01 0:14 ` [libgpiod][PATCH 6/9] bindings: python: examples: add type annotations Vincent Fazio
2026-04-01 0:14 ` [libgpiod][PATCH 7/9] bindings: python: examples: apply linter recommendations Vincent Fazio
2026-04-01 0:14 ` [libgpiod][PATCH 8/9] bindings: python: add a lint dependency group Vincent Fazio
2026-04-01 0:14 ` Vincent Fazio [this message]
2026-04-02 14:37 ` [libgpiod][PATCH 9/9] bindings: python: update linter configuration Bartosz Golaszewski
2026-04-02 15:55 ` Vincent Fazio
2026-04-02 16:42 ` Bartosz Golaszewski
2026-04-02 17:01 ` Vincent Fazio
2026-04-03 9:02 ` Bartosz Golaszewski
2026-04-03 13:09 ` Vincent Fazio
2026-04-03 9:01 ` [libgpiod][PATCH 1/9] bindings: python: build_tests: do not fallback to distutils Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260401001459.19159-9-vfazio@gmail.com \
--to=vfazio@gmail.com \
--cc=linux-gpio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox