diff --git a/adafruit_fingerprint.py b/adafruit_fingerprint.py index 7236ff0..8951327 100644 --- a/adafruit_fingerprint.py +++ b/adafruit_fingerprint.py @@ -26,6 +26,7 @@ """ try: from typing import Tuple, List, Union + from serial import Serial except ImportError: pass @@ -115,7 +116,11 @@ class Adafruit_Fingerprint: system_id = None status_register = None - def __init__(self, uart: UART, passwd: Tuple[int, int, int, int] = (0, 0, 0, 0)): + def __init__( + self, + uart: Union[UART, "Serial"], + passwd: Tuple[int, int, int, int] = (0, 0, 0, 0), + ): # Create object with UART for interface, and default 32-bit password self.password = passwd self._uart = uart