Skip to content

Commit 202b5eb

Browse files
Moved busio import inside a try block to save memory
1 parent cbb99e2 commit 202b5eb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

adafruit_ahtx0.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@
3030
"""
3131

3232
import time
33-
import busio
33+
34+
try:
35+
# This is only needed for typing
36+
import busio # pylint: disable=unused-import
37+
except ImportError:
38+
pass
39+
3440

3541
from adafruit_bus_device.i2c_device import I2CDevice
3642
from micropython import const

0 commit comments

Comments
 (0)