From 15279f68423a8440052784ee320d40ecb67b0cfb Mon Sep 17 00:00:00 2001 From: Antonio Caceres <antonio@antonio-caceres.com> Date: Mon, 14 Oct 2024 23:03:24 -0700 Subject: [PATCH] Remove abc from the abstract base classes. --- src/abstract.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/abstract.py b/src/abstract.py index 37953cf..0b5841d 100644 --- a/src/abstract.py +++ b/src/abstract.py @@ -1,27 +1,24 @@ -from abc import ABC, abstractmethod +"""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(ABC): +class ProximitySensor: """Abstract proximity sensor.""" @property - @abstractmethod def proximity(self) -> int: - ... + return -1 -class LEDController(ABC): +class LEDController: """Abstract LED controller.""" - @abstractmethod def fill(self, color: tuple[int, int, int]) -> None: - ... + pass -class TouchSensor(ABC): +class TouchSensor: """Abstract touch sensor.""" @property - @abstractmethod def value(self) -> bool: - ... + return False -- GitLab