From c419996f9a8048c20a6ec834996e3fc8c6191702 Mon Sep 17 00:00:00 2001 From: Thomas Franks Date: Wed, 24 Aug 2022 11:09:04 -0400 Subject: [PATCH] resolves #13 Missing Type Annotations --- adafruit_ssd1322.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/adafruit_ssd1322.py b/adafruit_ssd1322.py index 6fbc526..7d01723 100644 --- a/adafruit_ssd1322.py +++ b/adafruit_ssd1322.py @@ -73,7 +73,7 @@ class SSD1322(displayio.Display): (0, 90, 180, 270) """ - def __init__(self, bus, **kwargs): + def __init__(self, bus: displayio.FourWire, **kwargs) -> None: # Patch the init sequence for 32 pixel high displays. init_sequence = bytearray(_INIT_SEQUENCE) height = kwargs["height"] @@ -96,7 +96,7 @@ def __init__(self, bus, **kwargs): self._is_awake = True # Display starts in active state (_INIT_SEQUENCE) @property - def is_awake(self): + def is_awake(self) -> bool: """ The power state of the display. (read-only) `True` if the display is active, `False` if in sleep mode. @@ -104,7 +104,7 @@ def is_awake(self): """ return self._is_awake - def sleep(self): + def sleep(self) -> None: """ Put display into sleep mode. Display uses < 10uA in sleep mode. Display remembers display data and operation mode @@ -114,7 +114,7 @@ def sleep(self): self.bus.send(0xAE, b"") # 0xAE = display off, sleep mode self._is_awake = False - def wake(self): + def wake(self) -> None: """ Wake display from sleep mode """