Skip to content

Commit 3c92cfe

Browse files
authored
Merge pull request #29 from FoamyGuy/type_info
Type info
2 parents 9a3e9c3 + 2ea1b8a commit 3c92cfe

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

adafruit_ili9341.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
https://github.com/adafruit/circuitpython/releases
4747
4848
"""
49+
try:
50+
# used for typing only
51+
from typing import Any
52+
except ImportError:
53+
pass
4954

5055
import displayio
5156

@@ -80,7 +85,11 @@
8085

8186
# pylint: disable=too-few-public-methods
8287
class ILI9341(displayio.Display):
83-
"""ILI9341 display driver"""
88+
"""
89+
ILI9341 display driver
8490
85-
def __init__(self, bus, **kwargs):
91+
:param displayio.FourWire bus: bus that the display is connected to
92+
"""
93+
94+
def __init__(self, bus: displayio.FourWire, **kwargs: Any):
8695
super().__init__(bus, _INIT_SEQUENCE, **kwargs)

docs/conf.py

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
# digitalio, micropython and busio. List the modules you use. Without it, the
2727
# autodoc module docs will fail to generate with a warning.
2828
# autodoc_mock_imports = ["digitalio", "busio"]
29-
autodoc_mock_imports = ["displayio"]
3029

3130
intersphinx_mapping = {
3231
"python": ("https://docs.python.org/3.4", None),

0 commit comments

Comments
 (0)