File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 3333from micropython import const
3434
3535try :
36- import typing
37-
3836 from busio import I2C
3937except ImportError :
40- # define I2C to avoid the error:
41- # def __init__(self, i2c_bus: I2C, addr: int = 0x40) -> None:
42- # NameError: name 'I2C' is not defined
43- I2C = None
38+ pass
4439
4540__version__ = "0.0.0+auto.0"
4641__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_INA219.git"
@@ -153,7 +148,7 @@ class INA219:
153148 # raw_current RO : Current register (not scaled)
154149 # calibration RW : calibration register (note: value is cached)
155150
156- def __init__ (self , i2c_bus : I2C , addr : int = 0x40 ) -> None :
151+ def __init__ (self , i2c_bus : " I2C" , addr : int = 0x40 ) -> None :
157152 self .i2c_device = I2CDevice (i2c_bus , addr )
158153 self .i2c_addr = addr
159154
You can’t perform that action at this time.
0 commit comments