From 1c56c2c6e266b0e8ce55a74dca3178eee08a33b2 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 3 Dec 2021 10:37:08 -0600 Subject: [PATCH] separate typing imports try/except from sturct import try/except The changes to add type hints accidentally made the module non-importable on circuitpython boards. I'm not sure whether we need to keep the `ustruct` compatibility (it would only apply to micropython) but go ahead and do so. Closes: #36 --- adafruit_fingerprint.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/adafruit_fingerprint.py b/adafruit_fingerprint.py index 4f87f7d..b7e0a8b 100644 --- a/adafruit_fingerprint.py +++ b/adafruit_fingerprint.py @@ -30,6 +30,10 @@ try: from typing import Tuple, List, Union from busio import UART +except ImportError: + pass + +try: import struct except ImportError: import ustruct as struct