File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 13
13
14
14
from adafruit_bus_device import i2c_device
15
15
from micropython import const
16
- from busio import I2C
17
16
18
17
try :
19
18
from typing import Optional
19
+ from _typing import ReadableBuffer
20
+ from busio import I2C
20
21
except ImportError :
21
22
pass
22
23
@@ -57,7 +58,7 @@ def __init__(
57
58
self .blink_rate = 0
58
59
self .brightness = brightness
59
60
60
- def _write_cmd (self , byte : "_typing. ReadableBuffer" ):
61
+ def _write_cmd (self , byte : ReadableBuffer ):
61
62
self ._temp [0 ] = byte
62
63
with self .i2c_device :
63
64
self .i2c_device .write (self ._temp )
Original file line number Diff line number Diff line change 12
12
13
13
try :
14
14
from typing import Optional
15
+ from PIL import Image
15
16
except ImportError :
16
17
pass
17
18
@@ -210,7 +211,7 @@ def fill(self, color):
210
211
if self ._auto_write :
211
212
self .show ()
212
213
213
- def image (self , img : "PIL. Image" ):
214
+ def image (self , img : Image ):
214
215
"""Set buffer to value of Python Imaging Library image. The image should
215
216
be a size equal to the display size."""
216
217
imwidth , imheight = img .size
Original file line number Diff line number Diff line change 9
9
"""
10
10
11
11
from time import sleep
12
- from busio import I2C
13
12
from adafruit_ht16k33 .ht16k33 import HT16K33
14
13
15
14
try :
16
15
from typing import Union , List , Tuple
16
+ from busio import I2C
17
17
except ImportError :
18
18
pass
19
19
You can’t perform that action at this time.
0 commit comments