Skip to content

Commit 0365272

Browse files
committed
Add Missing Type Annotations
1 parent 9ad24bb commit 0365272

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

adafruit_displayio_sh1107.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
import displayio
3131
from micropython import const
3232

33+
try:
34+
from typing import Union
35+
except ImportError:
36+
pass
37+
3338
__version__ = "0.0.0+auto.0"
3439
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SH1107.git"
3540

@@ -141,7 +146,7 @@ class SH1107(displayio.Display):
141146

142147
def __init__(
143148
self,
144-
bus: displayio.I2CDisplay,
149+
bus: Union[displayio.I2CDisplay, displayio.Fourwire],
145150
display_offset: int = DISPLAY_OFFSET_ADAFRUIT_FEATHERWING_OLED_4650,
146151
rotation: int = 0,
147152
**kwargs

0 commit comments

Comments
 (0)