Skip to content

Commit 59cfabf

Browse files
committed
Made changes per review
1 parent c081766 commit 59cfabf

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

adafruit_ht16k33/ht16k33.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313

1414
from adafruit_bus_device import i2c_device
1515
from micropython import const
16-
from busio import I2C
1716

1817
try:
1918
from typing import Optional
19+
from _typing import ReadableBuffer
20+
from busio import I2C
2021
except ImportError:
2122
pass
2223

@@ -57,7 +58,7 @@ def __init__(
5758
self.blink_rate = 0
5859
self.brightness = brightness
5960

60-
def _write_cmd(self, byte: "_typing.ReadableBuffer"):
61+
def _write_cmd(self, byte: ReadableBuffer):
6162
self._temp[0] = byte
6263
with self.i2c_device:
6364
self.i2c_device.write(self._temp)

adafruit_ht16k33/matrix.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
try:
1414
from typing import Optional
15+
from PIL import Image
1516
except ImportError:
1617
pass
1718

@@ -210,7 +211,7 @@ def fill(self, color):
210211
if self._auto_write:
211212
self.show()
212213

213-
def image(self, img: "PIL.Image"):
214+
def image(self, img: Image):
214215
"""Set buffer to value of Python Imaging Library image. The image should
215216
be a size equal to the display size."""
216217
imwidth, imheight = img.size

adafruit_ht16k33/segments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
"""
1010

1111
from time import sleep
12-
from busio import I2C
1312
from adafruit_ht16k33.ht16k33 import HT16K33
1413

1514
try:
1615
from typing import Union, List, Tuple
16+
from busio import I2C
1717
except ImportError:
1818
pass
1919

0 commit comments

Comments
 (0)