Skip to content

Commit

Permalink
R1716 chained comparision complexity error
Browse files Browse the repository at this point in the history
  • Loading branch information
yacobucci committed Nov 8, 2024
1 parent 050da61 commit c698306
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/adafruit_blinka/microcontroller/generic_linux/i2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def scan(self):
# see https://www.i2c-bus.org/addressing
for addr in range(0x08, 0x78):
try:
if (addr >= 0x30 and addr <= 0x37) or (addr >= 0x50 and addr <= 0x5F):
if (0x30 <= addr <= 0x37) or (0x50 <= addr <= 0x5F):
self._i2c_bus.read_byte(addr)
else:
self._i2c_bus.write_quick(addr)
Expand Down

0 comments on commit c698306

Please sign in to comment.