File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 30
30
31
31
# imports
32
32
33
- import displayio
33
+ try :
34
+ # used for typing only
35
+ from typing import Any
36
+ except ImportError :
37
+ pass
38
+
39
+ # Support both 8.x.x and 9.x.x. Change when 8.x.x is discontinued as a stable release.
40
+ try :
41
+ from fourwire import FourWire # 9.x method
42
+ from busdisplay import BusDisplay
43
+ except ImportError :
44
+ from displayio import FourWire # 8.x method
45
+ from displayio import Display as BusDisplay
34
46
35
47
__version__ = "0.0.0+auto.0"
36
48
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_HX8357.git"
58
70
59
71
60
72
# pylint: disable=too-few-public-methods
61
- class HX8357 (displayio . Display ):
73
+ class HX8357 (BusDisplay ):
62
74
"""HX8357D driver"""
63
75
64
- def __init__ (self , bus : displayio .FourWire , ** kwargs ) -> None :
76
+ def __init__ (self , bus : FourWire .FourWire , ** kwargs ) -> None :
65
77
super ().__init__ (bus , _INIT_SEQUENCE , ** kwargs )
You can’t perform that action at this time.
0 commit comments