1
0
mirror of https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git synced 2026-10-24 00:48:53 +03:00
Vincent Fazio 2e0045486b bindings: python: parse non-tuple Iterable keys
When `chip.request_lines` was modified to allow `Iterable`s instead of
only `tuple`s, the code that checked for duplicate line entries in the
`config` argument was not updated to account for the expanded types.

If the `config` argument had a key that was not a `tuple`, `str`, or
`int`, a `TypeError` would be raised when resolving the line offset.

Refactor the code the resolves IDs to offsets into a separate function
to make the logic a bit clearer and to account for the widened types.

Fixes: 8f62e6c453 ("bindings: python: loosen type requirements in public API")
Closes: https://github.com/brgl/libgpiod/issues/148
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Link: https://lore.kernel.org/r/20250902123905.6491-1-vfazio@gmail.com
[Bartosz: don't pass the only argument by name in the call to
_resolve_config_keys_to_offsets()]
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-09-08 09:31:28 +02:00
2025-02-17 09:18:07 +01:00
2024-08-01 11:06:01 +02:00
2024-10-03 10:50:15 +02:00
2024-10-02 12:00:21 +02:00

libgpiod

C library and tools for interacting with the linux GPIO character device.

The project is hosted at https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/.

Documentation is available at https://libgpiod.readthedocs.io/.

Description
Библиотека C и инструменты для взаимодействия с Linux GPIO
Readme 3.4 MiB
Languages
C 53.5%
C++ 13.3%
Rust 12.1%
Python 11%
Shell 7.6%
Other 2.5%