1
0
mirror of https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git synced 2026-10-24 00:48:53 +03:00
Files
libgpiod/bindings/python/gpiod/chip_info.py
Bartosz Golaszewski d46e8f67aa bindings: python: doc: describe undocumented members
There are several public members in python bindings that are missing
docstrings. Document them for completeness.

Reviewed-by: Vincent Fazio <vfazio@xes-inc.com>
Link: https://lore.kernel.org/r/20250211-improve-docs-v4-5-dc56702c2ca8@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-02-17 09:17:53 +01:00

27 lines
557 B
Python

# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <brgl@bgdev.pl>
from dataclasses import dataclass
__all__ = ["ChipInfo"]
@dataclass(frozen=True, repr=False)
class ChipInfo:
"""
Snapshot of a chip's status.
"""
name: str
"""Name of the chip."""
label: str
"""Label of the chip."""
num_lines: int
"""Number of lines exposed by the chip."""
def __str__(self) -> str:
return f'<ChipInfo name="{self.name}" label="{self.label}" num_lines={self.num_lines}>'