Skip to content

Commit ff73e3a

Browse files
committed
Linted
1 parent 162fae0 commit ff73e3a

5 files changed

Lines changed: 11 additions & 14 deletions

File tree

Adafruit_MAX98357/I2S_Test_Script/code.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ def get_unique_pins():
3030
if bit_clock_pin is word_select_pin or bit_clock_pin is data_pin or word_select_pin\
3131
is data_pin:
3232
continue
33+
if is_hardware_i2s(bit_clock_pin, word_select_pin, data_pin):
34+
print("Bit clock pin:", bit_clock_pin, "\t Word select pin:", word_select_pin,
35+
"\t Data pin:", data_pin)
3336
else:
34-
if is_hardware_i2s(bit_clock_pin, word_select_pin, data_pin):
35-
print("Bit clock pin:", bit_clock_pin, "\t Word select pin:", word_select_pin,
36-
"\t Data pin:", data_pin)
37-
else:
38-
pass
37+
pass

CircuitPython_TVBGone/cpx_main/code.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import board
55
import pwmio
66
import pulseio
7-
import pwmio
87
from digitalio import DigitalInOut, Direction, Pull
98
# pylint: disable=eval-used
109
# Switch to select 'stealth-mode'

CircuitPython_TVBGone/gemma_main/code.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import board
77
import pwmio
88
import pulseio
9-
import pwmio
109
from digitalio import DigitalInOut, Direction
1110

1211
# pylint: disable=eval-used

PyPortal_Electioncal_US/electioncal/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# Get wifi details and more from a secrets.py file
1010
try:
11-
from secrets import secrets
11+
from secrets import secrets # pylint: disable=unused-import
1212
except ImportError:
1313
print("WiFi secrets are kept in secrets.py, please add them there!")
1414
raise

PyPortal_Electioncal_US/electioncal_graphics/code.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ def __init__(self, root_group, *, am_pm=True):
6969

7070
def load_data(self, election_data):
7171
try:
72-
self.electioncal = json.loads(election_data)
73-
self.state_text.text = self.electioncal["dates"][1]["county"] + ", " + self.electioncal["dates"][0]["state"]
72+
self.electioncal = json.loads(election_data) # pylint: disable=attribute-defined-outside-init
73+
self.state_text.text = self.electioncal["dates"][1]["county"] + ", " + self.electioncal["dates"][0]["state"] # pylint: disable=line-too-long
7474
except ValueError:
75-
print("Error loading JSON data: Please check the configuration of county and state, in code.py")
75+
print("Error loading JSON data: Please check the configuration of county and state, in code.py") # pylint: disable=line-too-long
7676
raise
7777

7878
def elections_cycle(self):
@@ -83,7 +83,7 @@ def elections_cycle(self):
8383
if self.date_text.text[10:] < self.electioncal["dates"][i]["date"]:
8484
self.election_date_text.text = self.electioncal["dates"][i]["date"]
8585
# splitting the line at around 40 chars seems ok for regular PyPortal
86-
self.election_name_text_line2.text, self.election_name_text.text = self.paragrapher(self.electioncal["dates"][i]["name"], 40)
86+
self.election_name_text_line2.text, self.election_name_text.text = self.paragrapher(self.electioncal["dates"][i]["name"], 40) # pylint: disable=line-too-long
8787
time.sleep(30)
8888

8989
def update_time(self):
@@ -104,11 +104,11 @@ def update_time(self):
104104
time_format_str = time_format_str+" AM"
105105
if hour == 0:
106106
hour = 12
107-
time_str = time_format_str % (hour, minute)
107+
time_str = time_format_str % (hour, minute) # pylint: disable=unused-variable
108108
date_str = date_format_str % (year, month, day)
109109
self.date_text.text = "Today is: " + date_str
110110

111-
def paragrapher(self, text, cut):
111+
def paragrapher(self, text, cut): # pylint: disable=no-self-use
112112
""" Cuts a long line into two, having spaces in mind.
113113
Note we return line2 first as it looks better to clear the line2
114114
before printing a line1 with empty line2

0 commit comments

Comments
 (0)