Skip to content

Add Missing Type Annotations #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion adafruit_il0373.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@

import displayio

try:
from typing import Optional
from displayio import FourWire
except ImportError:
pass

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

Expand Down Expand Up @@ -130,7 +136,13 @@ class IL0373(displayio.EPaperDisplay):
Invert black bit values
"""

def __init__(self, bus, swap_rams=False, border=False, **kwargs):
def __init__(
self,
bus: FourWire,
swap_rams: bool = False,
border: Optional[bool] = False,
**kwargs
) -> None:
if kwargs.get("grayscale", False):
start_sequence = bytearray(_GRAYSCALE_START_SEQUENCE)
else:
Expand Down