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

Bartosz Golaszewski
2026-04-02T14:37:49Z

On Wed, 1 Apr 2026 02:14:58 +0200, Vincent Fazio <vfazio@gmail.com> said:
> 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>
> ---

Ruff checks work fine but I'm seeing this with mypy:

$ mypy
build_tests.py:22: error: Library stubs not installed for "setuptools"
[import-untyped]
build_tests.py:23: error: Library stubs not installed for
"setuptools.command.build_ext" [import-untyped]
build_tests.py:23: note: Hint: "python3 -m pip install types-setuptools"
build_tests.py:23: note: (or run "mypy --install-types" to install all
missing stub packages)
build_tests.py:23: note: See
https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
setup.py:10: error: Library stubs not installed for "setuptools"
[import-untyped]
setup.py:11: error: Library stubs not installed for
"setuptools.command.build_ext" [import-untyped]
setup.py:12: error: Library stubs not installed for
"setuptools.command.sdist" [import-untyped]
setup.py:13: error: Library stubs not installed for
"setuptools.errors" [import-untyped]
Found 6 errors in 2 files (checked 45 source files)

I'm using mypy v1.20.0. Is this something with my environment?

Bart