Skip to content

Commit a515c4e

Browse files
committed
Wrap busio import behind typing import
1 parent 10050da commit a515c4e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

adafruit_am2320.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@
3636

3737
from adafruit_bus_device.i2c_device import I2CDevice
3838
from micropython import const
39-
from busio import I2C
39+
40+
try:
41+
# Used only for typing
42+
import typing # pylint: disable=unused-import
43+
from busio import I2C
44+
except ImportError:
45+
pass
4046

4147
__version__ = "0.0.0-auto.0"
4248
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_am2320.git"

0 commit comments

Comments
 (0)