Skip to content

Commit 742f360

Browse files
authored
Merge pull request #10 from tcfranks/main
Add Missing Type Annotations
2 parents 985d6b3 + 4d9651a commit 742f360

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adafruit_displayio_sh1106.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class SH1106(displayio.Display):
6262
:param int rotation: The rotation of the display. 0, 90, 180 or 270.
6363
"""
6464

65-
def __init__(self, bus, **kwargs):
65+
def __init__(self, bus: displayio.Fourwire, **kwargs) -> None:
6666
init_sequence = bytearray(_INIT_SEQUENCE)
6767
super().__init__(
6868
bus,
@@ -83,15 +83,15 @@ def __init__(self, bus, **kwargs):
8383
self._is_awake = True # Display starts in active state (_INIT_SEQUENCE)
8484

8585
@property
86-
def is_awake(self):
86+
def is_awake(self) -> bool:
8787
"""
8888
The power state of the display. (read-only)
8989
9090
`True` if the display is active, `False` if in sleep mode.
9191
"""
9292
return self._is_awake
9393

94-
def sleep(self):
94+
def sleep(self) -> None:
9595
"""
9696
Put display into sleep mode. The display uses < 5uA in sleep mode.
9797
@@ -106,7 +106,7 @@ def sleep(self):
106106
self.bus.send(0xAE, b"") # 0xAE = display off, sleep mode
107107
self._is_awake = False
108108

109-
def wake(self):
109+
def wake(self) -> None:
110110
"""
111111
Wake display from sleep mode
112112
"""

0 commit comments

Comments
 (0)