Skip to content

Commit 2497c09

Browse files
committed
Tried to fix type annotations.
1 parent bca2cf6 commit 2497c09

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_ms8607.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,15 +396,15 @@ def _read_hum_user_register(self) -> bytearray:
396396

397397
return self._buffer[0]
398398

399-
def _set_hum_user_register(self, register_value: Byte) -> None:
399+
def _set_hum_user_register(self, register_value: bytearray) -> None:
400400
self._buffer[0] = _MS8607_HUM_CMD_WRITE_USR
401401
self._buffer[1] = register_value
402402
with self.humidity_i2c_device as i2c:
403403
# shouldn't this end at two?
404404
i2c.write(self._buffer, end=2)
405405

406406
@staticmethod
407-
def _check_humidity_crc(value: int, crc: Byte) -> bool:
407+
def _check_humidity_crc(value: int, crc: bytearray) -> bool:
408408
polynom = 0x988000 # x^8 + x^5 + x^4 + 1
409409
msb = 0x800000
410410
mask = 0xFF8000
@@ -425,7 +425,7 @@ def _check_humidity_crc(value: int, crc: Byte) -> bool:
425425
return False
426426

427427
@staticmethod
428-
def _check_press_calibration_crc(calibration_int16s: bytearray, crc: Byte) -> bool:
428+
def _check_press_calibration_crc(calibration_int16s: bytearray, crc: bytearray) -> bool:
429429
cnt = 0
430430
n_rem = 0
431431
n_rem = 0

0 commit comments

Comments
 (0)