Skip to content

Commit edbee5e

Browse files
committed
fixed pylint issues in example 3
1 parent 106face commit edbee5e

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Coming Soon
1+
Introduction
22
============
33

44
.. image:: https://readthedocs.org/projects/sparkfun-circuitpython-qwiicrelay/badge/?version=latest

examples/example3_i2c_scanner.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,21 @@ def test_i2c_write(addr):
5555

5656
try:
5757
while True:
58-
found = []
58+
found = []
5959

60-
# scan through all possible i2c addresses doi
61-
for address in range(0x03, 0x80):
62-
if(test_i2c_write(address)):
63-
found.append(address)
60+
# scan through all possible i2c addresses doi
61+
for address in range(0x03, 0x80):
62+
if(test_i2c_write(address)):
63+
found.append(address)
6464

65-
if(len(found) > 0):
66-
print('I2C addresses found:',
67-
[hex(device_address) for device_address in found])
68-
else:
69-
print('No I2C device found.')
65+
if found:
66+
print('I2C addresses found:',
67+
[hex(device_address) for device_address in found])
68+
else:
69+
print('No I2C device found.')
7070

71-
# wait a bit and scan again
72-
sleep(5)
71+
# wait a bit and scan again
72+
sleep(5)
7373

7474
except KeyboardInterrupt:
7575
pass

0 commit comments

Comments
 (0)