Skip to content

Commit 223fca4

Browse files
committed
restore adafruit-blinka requirement for type annotations
1 parent 3d94a10 commit 223fca4

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

adafruit_bus_device/i2c_device.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@
1010
try:
1111
from typing import Optional, Type
1212
from types import TracebackType
13-
from busio import I2C
14-
15-
try:
16-
from circuitpython_typing import ReadableBuffer, WriteableBuffer
17-
except ImportError:
18-
from _typing import ReadableBuffer, WriteableBuffer
13+
from circuitpython_typing import ReadableBuffer, WriteableBuffer
1914
except ImportError:
2015
pass
2116

17+
from busio import I2C
18+
2219
__version__ = "0.0.0-auto.0"
2320
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_BusDevice.git"
2421

adafruit_bus_device/spi_device.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
try:
1313
from typing import Optional, Type
1414
from types import TracebackType
15-
from busio import SPI
16-
from digitalio import DigitalInOut
1715
except ImportError:
1816
pass
1917

18+
from busio import SPI
19+
from digitalio import DigitalInOut
20+
2021
__version__ = "0.0.0-auto.0"
2122
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_BusDevice.git"
2223

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# Uncomment the below if you use native CircuitPython modules such as
2424
# digitalio, micropython and busio. List the modules you use. Without it, the
2525
# autodoc module docs will fail to generate with a warning.
26-
autodoc_mock_imports = ["busio", "digitalio", "circuitpython_typing", "_typing"]
26+
autodoc_mock_imports = ["busio", "digitalio", "circuitpython_typing"]
2727

2828
intersphinx_mapping = {
2929
"python": ("https://docs.python.org/3", None),

requirements.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SPDX-FileCopyrightText: 2020 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
5+
adafruit-blinka

0 commit comments

Comments
 (0)