Skip to content

Commit bad25bc

Browse files
committed
lint
1 parent 9db81d6 commit bad25bc

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

adafruit_tca9548a.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,17 @@ def writeto_then_readfrom(self, address, buffer_out, buffer_in, **kwargs):
8787
#In linux, at least, this is a special kernel function call
8888
if address == self.tca.address:
8989
raise ValueError("Device address must be different than TCA9548A address.")
90-
90+
9191
if hasattr(self.tca.i2c, 'writeto_then_readfrom'):
9292
self.tca.i2c.writeto_then_readfrom(address, buffer_out, buffer_in, **kwargs)
9393
else:
94-
self.tca.i2c.writeto(address, buffer_out, start=kwargs.get("out_start", 0), end=kwargs.get("out_end", None), stop=False)
95-
self.tca.i2c.readfrom_into(address, buffer_in, start=kwargs.get("in_start", 0), end=kwargs.get("in_end", None))
94+
self.tca.i2c.writeto(address, buffer_out,
95+
start=kwargs.get("out_start", 0),
96+
end=kwargs.get("out_end", None),
97+
stop=False)
98+
self.tca.i2c.readfrom_into(address, buffer_in,
99+
start=kwargs.get("in_start", 0),
100+
end=kwargs.get("in_end", None))
96101

97102
class TCA9548A():
98103
"""Class which provides interface to TCA9548A I2C multiplexer."""

0 commit comments

Comments
 (0)