abstract.py 530 Bytes
"""Collection of abstract classes for type hinting in the rest of the project."""
# We aren't using the abc module because it isn't available on circuitpy.

class ProximitySensor:
    """Abstract proximity sensor."""

    @property
    def proximity(self) -> int:
        return -1


class LEDController:
    """Abstract LED controller."""

    def fill(self, color: tuple[int, int, int]) -> None:
        pass


class TouchSensor:
    """Abstract touch sensor."""

    @property
    def value(self) -> bool:
        return False