Merge pull request #29 from FoamyGuy/type_info

Type info
This commit is contained in:
Mark 2021-10-07 20:43:43 -05:00 committed by GitHub
commit 3c92cfe003
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View file

@ -46,6 +46,11 @@ Implementation Notes
https://github.com/adafruit/circuitpython/releases
"""
try:
# used for typing only
from typing import Any
except ImportError:
pass
import displayio
@ -80,7 +85,11 @@ _INIT_SEQUENCE = (
# pylint: disable=too-few-public-methods
class ILI9341(displayio.Display):
"""ILI9341 display driver"""
"""
ILI9341 display driver
def __init__(self, bus, **kwargs):
:param displayio.FourWire bus: bus that the display is connected to
"""
def __init__(self, bus: displayio.FourWire, **kwargs: Any):
super().__init__(bus, _INIT_SEQUENCE, **kwargs)

View file

@ -26,7 +26,6 @@ extensions = [
# digitalio, micropython and busio. List the modules you use. Without it, the
# autodoc module docs will fail to generate with a warning.
# autodoc_mock_imports = ["digitalio", "busio"]
autodoc_mock_imports = ["displayio"]
intersphinx_mapping = {
"python": ("https://docs.python.org/3.4", None),