Skip to content

Commit

Permalink
Merge pull request #15 from tcfranks/main
Browse files Browse the repository at this point in the history
Add Missing Type Annotations
  • Loading branch information
tekktrik committed Sep 3, 2022
2 parents ad1b5e7 + 2c23794 commit 9fbc74b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion adafruit_displayio_ssd1305.py
Expand Up @@ -31,6 +31,11 @@

import displayio

try:
from typing import Union
except ImportError:
pass

__version__ = "0.0.0+auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SSD1305.git"

Expand Down Expand Up @@ -65,7 +70,9 @@ class SSD1305(displayio.Display):
One of (0, 90, 180, 270)
"""

def __init__(self, bus, **kwargs):
def __init__(
self, bus: Union[displayio.Fourwire, displayio.I2CDisplay], **kwargs
) -> None:
colstart = 0
# Patch the init sequence for 32 pixel high displays.
init_sequence = bytearray(_INIT_SEQUENCE)
Expand Down

0 comments on commit 9fbc74b

Please sign in to comment.