mirror of
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
synced 2026-10-24 00:48:53 +03:00
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>
23 lines
561 B
Python
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")
|