Skip to content

Commit 14eb49b

Browse files
committed
add serial.Serial as a valid type for uart parameter of Adafruit_Fingerprint.__init__
1 parent dc4edf2 commit 14eb49b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

adafruit_fingerprint.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"""
2727
try:
2828
from typing import Tuple, List, Union
29+
from serial import Serial
2930
except ImportError:
3031
pass
3132

@@ -115,7 +116,7 @@ class Adafruit_Fingerprint:
115116
system_id = None
116117
status_register = None
117118

118-
def __init__(self, uart: UART, passwd: Tuple[int, int, int, int] = (0, 0, 0, 0)):
119+
def __init__(self, uart: Union[UART, "Serial"], passwd: Tuple[int, int, int, int] = (0, 0, 0, 0)):
119120
# Create object with UART for interface, and default 32-bit password
120121
self.password = passwd
121122
self._uart = uart

0 commit comments

Comments
 (0)