Skip to content

Commit 7eca570

Browse files
committed
linted
1 parent dc1a59f commit 7eca570

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

adafruit_mlx90395.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
from time import sleep
4242
from struct import unpack_from
4343
from micropython import const
44-
import adafruit_bus_device.i2c_device as i2c_device
44+
from adafruit_bus_device import i2c_device
4545

4646
# from adafruit_register.i2c_struct import ROUnaryStruct, Struct
4747
from adafruit_register.i2c_bits import RWBits
@@ -166,7 +166,10 @@ class MLX90395:
166166
_resolution = RWBits(2, _REG_2, 5, 2, False)
167167
_filter = RWBits(3, _REG_2, 2, 2, False)
168168
_osr = RWBits(2, _REG_2, 0, 2, False)
169-
_reg0 = UnaryStruct(_REG_0, ">H",)
169+
_reg0 = UnaryStruct(
170+
_REG_0,
171+
">H",
172+
)
170173
_reg2 = UnaryStruct(_REG_2, ">H")
171174

172175
def __init__(self, i2c_bus, address=_DEFAULT_ADDR):
@@ -245,7 +248,7 @@ def magnetic(self):
245248
def _read_measurement(self):
246249

247250
# clear the buffer
248-
for i in range(len(self._buffer)):
251+
for i in range(len(self._buffer)): # pylint: disable=consider-using-enumerate
249252
self._buffer[i] = 0
250253
self._buffer[0] = 0x80 # read memory command
251254

0 commit comments

Comments
 (0)