Skip to content

Commit 3626da3

Browse files
authored
Try imports in separate blocks
As @FoamyGuy pointed out, you may have one or the other library, both or none. This handles the combinations properly.
1 parent c0115d6 commit 3626da3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

adafruit_displayio_layout/widgets/cartesian.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333

3434
try:
3535
import bitmaptools
36+
except ImportError:
37+
pass
38+
39+
try:
3640
from typing import Tuple
3741
except ImportError:
3842
pass

0 commit comments

Comments
 (0)