Skip to content

Commit d3b4b20

Browse files
committed
Tried to fix type annotations.
1 parent b4e35b9 commit d3b4b20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adafruit_ms8607.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@
3535

3636
from struct import unpack_from
3737
from time import sleep
38-
from micropython import const
38+
# from micropython import const
3939
from adafruit_bus_device import i2c_device
4040

4141
try:
4242
"""Needed for type annotations"""
4343
from busio import I2C
44-
from typing import Tuple, Any, Byte
44+
from typing import Tuple, Any
4545

4646
except ImportError:
47-
pass
47+
print("Couldnt import")
4848

4949

5050
_MS8607_HSENSOR_ADDR = const(0x40) #
@@ -386,7 +386,7 @@ def humidity_resolution(self, resolution: HumidityResolution) -> None:
386386

387387
self._set_hum_user_register(reg_value)
388388

389-
def _read_hum_user_register(self) -> Byte:
389+
def _read_hum_user_register(self) -> bytearray:
390390
self._buffer[0] = _MS8607_HUM_CMD_READ_USR
391391
with self.humidity_i2c_device as i2c:
392392
i2c.write(self._buffer, end=1)

0 commit comments

Comments
 (0)