Commit 15279f68 authored by Antonio Caceres's avatar Antonio Caceres
Browse files

Remove abc from the abstract base classes.

parent a9cbb517
No related merge requests found
Showing with 8 additions and 11 deletions
+8 -11
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:
class ProximitySensor(ABC):
"""Abstract proximity sensor.""" """Abstract proximity sensor."""
@property @property
@abstractmethod
def proximity(self) -> int: def proximity(self) -> int:
... return -1
class LEDController(ABC): class LEDController:
"""Abstract LED controller.""" """Abstract LED controller."""
@abstractmethod
def fill(self, color: tuple[int, int, int]) -> None: def fill(self, color: tuple[int, int, int]) -> None:
... pass
class TouchSensor(ABC): class TouchSensor:
"""Abstract touch sensor.""" """Abstract touch sensor."""
@property @property
@abstractmethod
def value(self) -> bool: def value(self) -> bool:
... return False
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment