Skip to content

Commit 55cfe59

Browse files
authored
Merge pull request #19 from tekktrik/dev/use-protocol-typing
Convert annotation from pillow to circuitpython_typing
2 parents e490614 + 526f510 commit 55cfe59

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

adafruit_is31fl3741/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
try:
3333
# Used only for typing
3434
from typing import Optional, Tuple, Union # pylint: disable=unused-import
35-
from PIL.ImageFile import ImageFile
35+
from circuitpython_typing.pil import Image
3636
from adafruit_framebuf import FrameBuffer
3737
import busio
3838
except ImportError:
@@ -335,7 +335,7 @@ def pixel(self, x: int, y: int, color: Optional[int] = None) -> Union[int, None]
335335
)
336336
return None
337337

338-
def image(self, img: Union[FrameBuffer, ImageFile]) -> None:
338+
def image(self, img: Union[FrameBuffer, Image]) -> None:
339339
"""Copy an in-memory image to the LED matrix. Image should be in
340340
24-bit format (e.g. "RGB888") and dimensions should match matrix,
341341
this isn't super robust yet or anything.

optional_requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# SPDX-FileCopyrightText: 2022 Alec Delaney, for Adafruit Industries
22
#
33
# SPDX-License-Identifier: Unlicense
4+
5+
pillow

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
Adafruit-Blinka
66
adafruit-circuitpython-framebuf
77
adafruit-circuitpython-busdevice
8-
pillow
8+
adafruit-circuitpython-typing~=1.6
99
adafruit-circuitpython-register

0 commit comments

Comments
 (0)