Skip to content

Commit da9a46c

Browse files
committed
linting
1 parent 3dab6e6 commit da9a46c

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

adafruit_seesaw/seesaw.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,10 @@ def __init__(self, i2c_bus, addr=0x49, drdy=None, reset=True):
169169
from adafruit_seesaw.robohat import MM1_Pinmap
170170

171171
self.pin_mapping = MM1_Pinmap
172-
elif (pid in (_5690_PID, _5681_PID, _5743_PID)) or (self.chip_id in (_ATTINY817_HW_ID_CODE, _ATTINY807_HW_ID_CODE, _ATTINY1617_HW_ID_CODE)):
172+
elif (pid in (_5690_PID, _5681_PID, _5743_PID)) or (self.chip_id in
173+
(_ATTINY817_HW_ID_CODE,
174+
_ATTINY807_HW_ID_CODE,
175+
_ATTINY1617_HW_ID_CODE)):
173176
from adafruit_seesaw.attinyx16 import ATtinyx16_Pinmap
174177

175178
self.pin_mapping = ATtinyx16_Pinmap

examples/seesaw_quadrotary.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import adafruit_seesaw.neopixel
1010
import adafruit_seesaw.rotaryio
1111
import adafruit_seesaw.digitalio
12-
import time
1312

1413
# For use with the STEMMA connector on QT Py RP2040
1514
# import busio
@@ -38,7 +37,7 @@
3837

3938
for n, rotary_pos in enumerate(positions):
4039
if rotary_pos != last_positions[n]:
41-
print("Rotary #%d: %d" % (n, rotary_pos))
40+
print(f"Rotary #{n}: {rotary_pos}")
4241
last_positions[n] = rotary_pos
4342

4443
if switches[n].value: # Change the LED color if switch is not pressed
@@ -50,6 +49,6 @@
5049

5150
# if switch is pressed, light up white, otherwise use the stored color
5251
if not switches[n].value:
53-
pixels[n] = 0xFFFFFF
52+
pixels[n] = 0xFFFFFF
5453
else:
55-
pixels[n] = colorwheel(colors[n])
54+
pixels[n] = colorwheel(colors[n])

0 commit comments

Comments
 (0)