Re: [libgpiod][PATCH 9/9] bindings: python: update linter configuration

Vincent Fazio
2026-04-03T13:09:39Z

On Fri, Apr 3, 2026 at 4:02 AM Bartosz Golaszewski <brgl@kernel.org> wrote:
>
> I do run them but don't necessarily want them as a commit hook since
> not everyone is working on python side of libgpiod.

There are tools like pre-commit [0] and prek [1] that can trigger
specific actions based on what in the tree is being modified and file
type if that's something you're interested in.

>
> I queued the patches, thanks! I have to say: it's crazy how much
> faster ruff is compared to mypy.

mypy (at least the compiled version) is not too bad when it has a
cache built up since it can do incremental comparisons.

There are alternatives like ty and zuban that are written in rust but
mypy is the reference implementation and not all tools have the same
comprehensive checks, though there is evidence [2] that I may be
operating on old information.

[0]: https://github.com/pre-commit/pre-commit
[1]: https://github.com/j178/prek
[2]: https://htmlpreview.github.io/?https://github.com/python/typing/blob/main/conformance/results/results.html