File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: Copyright (c) 2022 Alec Delaney
2+ # SPDX-License-Identifier: MIT
3+ """
4+ `circuitpython_typing.device_drivers`
5+ ================================================================================
6+
7+ Type annotation definitions for device drivers. Used for `adafruit_register`.
8+
9+ * Author(s): Alec Delaney
10+ """
11+
12+ from adafruit_bus_device import I2CDevice
13+
14+ # # Protocol was introduced in Python 3.8.
15+ try :
16+ from typing import Protocol
17+ except ImportError :
18+ from typing_extensions import Protocol
19+
20+
21+ # pylint: disable=too-few-public-methods
22+ class I2CDeviceDriver (Protocol ):
23+ """Describes classes that are drivers utilizing `I2CDevice`"""
24+
25+ i2c_device : I2CDevice
Original file line number Diff line number Diff line change 44# SPDX-License-Identifier: MIT
55
66typing_extensions ; python_version < = '3.7'
7+ adafruit-circuitpython-busdevice
Original file line number Diff line number Diff line change 3939 # Author details
4040 author = "Adafruit Industries" ,
4141 author_email = "circuitpython@adafruit.com" ,
42- install_requires = ["typing_extensions; python_version <= '3.7'" ],
42+ install_requires = [
43+ "typing_extensions; python_version <= '3.7'" ,
44+ "adafruit-circuitpython-busdevice" ,
45+ ],
4346 # Choose your license
4447 license = "MIT" ,
4548 # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
You can’t perform that action at this time.
0 commit comments