1
0
mirror of https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git synced 2026-10-25 12:39:18 +03:00
Files
libgpiod/bindings/python/gpiod/exception.py
Vincent Fazio 498ec6df34 bindings: python: add missing method type hints
Add type hints for all method arguments and return values.

Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
Link: https://lore.kernel.org/r/20241114145116.2123714-7-vfazio@xes-inc.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-11-19 15:21:01 +01:00

23 lines
561 B
Python

# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <brgl@bgdev.pl>
__all__ = ["ChipClosedError", "RequestReleasedError"]
class ChipClosedError(Exception):
"""
Error raised when an already closed chip is used.
"""
def __init__(self) -> None:
super().__init__("I/O operation on closed chip")
class RequestReleasedError(Exception):
"""
Error raised when a released request is used.
"""
def __init__(self) -> None:
super().__init__("GPIO lines have been released")