Skip to content

Commit fc5a080

Browse files
authored
Merge pull request #17 from tcfranks/main
resolves #13 Missing Type Annotations
2 parents 11d2bf0 + c419996 commit fc5a080

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adafruit_ssd1322.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class SSD1322(displayio.Display):
7373
(0, 90, 180, 270)
7474
"""
7575

76-
def __init__(self, bus, **kwargs):
76+
def __init__(self, bus: displayio.FourWire, **kwargs) -> None:
7777
# Patch the init sequence for 32 pixel high displays.
7878
init_sequence = bytearray(_INIT_SEQUENCE)
7979
height = kwargs["height"]
@@ -96,15 +96,15 @@ def __init__(self, bus, **kwargs):
9696
self._is_awake = True # Display starts in active state (_INIT_SEQUENCE)
9797

9898
@property
99-
def is_awake(self):
99+
def is_awake(self) -> bool:
100100
"""
101101
The power state of the display. (read-only)
102102
`True` if the display is active, `False` if in sleep mode.
103103
:type: bool
104104
"""
105105
return self._is_awake
106106

107-
def sleep(self):
107+
def sleep(self) -> None:
108108
"""
109109
Put display into sleep mode.
110110
Display uses < 10uA in sleep mode. Display remembers display data and operation mode
@@ -114,7 +114,7 @@ def sleep(self):
114114
self.bus.send(0xAE, b"") # 0xAE = display off, sleep mode
115115
self._is_awake = False
116116

117-
def wake(self):
117+
def wake(self) -> None:
118118
"""
119119
Wake display from sleep mode
120120
"""

0 commit comments

Comments
 (0)