Skip to content

Commit 9919955

Browse files
committed
Linted
1 parent 4aacd4c commit 9919955

7 files changed

Lines changed: 17 additions & 17 deletions

File tree

  • FeatherCAN_CircuitPython/sender-ack
  • MagTag_Progress_Displays
  • PDM_Microphone/Wheres_my_PDMIn
  • Pathfinder
  • Weather_Display_Matrix/weather_display_matrix

FeatherCAN_CircuitPython/sender-ack/code.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
if ack_count == count:
5252
print(f"Received ACK")
5353
break
54-
else:
55-
print(f"Received incorrect ACK: {ack_count} should be {count}")
54+
print(f"Received incorrect ACK: {ack_count} should be {count}")
5655

5756
time.sleep(.5)
5857
count += 1

MagTag_Progress_Displays/weblate_translated_percent/code.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
Copy leaguespartan18.bdf and leaguespartan11.bdf
1010
into fonts/ on your CIRCUITPY drive.
1111
"""
12-
import time
1312
from adafruit_magtag.magtag import MagTag
1413
from adafruit_progressbar.progressbar import ProgressBar
1514

MagTag_Progress_Displays/year_progress_percent/code.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
Copy epilogue18.bdf into fonts/ on your CIRCUITPY drive.
88
99
"""
10-
import time
1110
from adafruit_magtag.magtag import MagTag
1211
from adafruit_progressbar.progressbar import ProgressBar
1312
import rtc

PDM_Microphone/Wheres_my_PDMIn/code.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ def get_unique_pins():
3030
for data_pin in get_unique_pins():
3131
if clock_pin is data_pin:
3232
continue
33+
if is_hardware_PDM(clock_pin, data_pin):
34+
print("Clock pin:", clock_pin, "\t Data pin:", data_pin)
3335
else:
34-
if is_hardware_PDM(clock_pin, data_pin):
35-
print("Clock pin:", clock_pin, "\t Data pin:", data_pin)
36-
else:
37-
pass
36+
pass

Pathfinder/pathfinder_auto/code.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
BLACK = (0, 0, 0)
3232
GREY = (10, 10, 10)
3333

34-
if eye_mode is not 0:
34+
if eye_mode != 0:
3535
colors = [PINK, RED, ORANGE, CYAN, YELLOW, GREEN, WHITE, RED, PURPLE, GREEN, GREY]
3636
else:
3737
colors = [RED, RED, RED, RED, RED, RED, RED, RED, RED, RED, RED]
@@ -74,14 +74,16 @@
7474
# Setup the file as the bitmap data source
7575
bitmap = displayio.OnDiskBitmap(bitmap_file)
7676
# Create a TileGrid to hold the bitmap
77-
tile_grid = displayio.TileGrid(bitmap, pixel_shader=getattr(bitmap, 'pixel_shader', displayio.ColorConverter()))
77+
tile_grid = displayio.TileGrid(bitmap, pixel_shader=getattr(bitmap,
78+
'pixel_shader',
79+
displayio.ColorConverter()))
7880
# Create a Group to hold the TileGrid
7981
group = displayio.Group()
8082
# Add the TileGrid to the Group
8183
group.append(tile_grid)
8284
# Add the Group to the Display
8385
display.show(group)
84-
if sound_mode is not 0:
86+
if sound_mode != 0:
8587
# play a sound file
8688
pyportal.play_file(vo_sound[10])
8789
else:
@@ -119,7 +121,7 @@
119121
# group.append(tile_grid)
120122
# display.show(group)
121123

122-
if sound_mode is not 0:
124+
if sound_mode != 0:
123125
# play a sound file
124126
pyportal.play_file(vo_sound[i])
125127
else:

Pathfinder/pathfinder_touch/code.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
BLACK = (0, 0, 0)
3030
GREY = (10, 10, 10)
3131

32-
if eye_mode is not 0:
32+
if eye_mode != 0:
3333
colors = [PINK, RED, ORANGE, CYAN, YELLOW, GREEN, WHITE, RED, PURPLE, GREEN, GREY]
3434
else:
3535
colors = [RED, RED, RED, RED, RED, RED, RED, RED, RED, RED, RED]
@@ -72,14 +72,16 @@
7272
# Setup the file as the bitmap data source
7373
bitmap = displayio.OnDiskBitmap(bitmap_file)
7474
# Create a TileGrid to hold the bitmap
75-
tile_grid = displayio.TileGrid(bitmap, pixel_shader=getattr(bitmap, 'pixel_shader', displayio.ColorConverter()))
75+
tile_grid = displayio.TileGrid(bitmap, pixel_shader=getattr(bitmap,
76+
'pixel_shader',
77+
displayio.ColorConverter()))
7678
# Create a Group to hold the TileGrid
7779
group = displayio.Group()
7880
# Add the TileGrid to the Group
7981
group.append(tile_grid)
8082
# Add the Group to the Display
8183
display.show(group)
82-
if sound_mode is not 0:
84+
if sound_mode != 0:
8385
# play a sound file
8486
pyportal.play_file(vo_sound[10])
8587
else:
@@ -113,7 +115,7 @@
113115
# group.append(tile_grid)
114116
# display.show(group)
115117

116-
if sound_mode is not 0:
118+
if sound_mode != 0:
117119
# play a sound file
118120
pyportal.play_file(vo_sound[i])
119121
else:

Weather_Display_Matrix/weather_display_matrix/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
# --- Display setup ---
6969
matrix = Matrix()
7070
network = Network(status_neopixel=board.NEOPIXEL, debug=True)
71-
if UNITS == "imperial" or UNITS == "metric":
71+
if UNITS in ("imperial", "metric"):
7272
gfx = openweather_graphics.OpenWeather_Graphics(
7373
matrix.display, am_pm=True, units=UNITS
7474
)

0 commit comments

Comments
 (0)