Skip to content

Commit ba9099d

Browse files
committed
fixing pylint errors
1 parent 4965a40 commit ba9099d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Espresso_Water_Meter/code.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def set_pixel_color(distance):
103103
avg_distance = get_average_distance()
104104

105105
if avg_distance is not None:
106-
# pylint: disable=consider-using-min-builtin
106+
107107
if avg_distance >= 22:
108108
# pylint: disable=invalid-name
109109
avg_distance = 22
@@ -118,7 +118,7 @@ def set_pixel_color(distance):
118118

119119
# Try connecting to WiFi
120120
try:
121-
# pylint: disable=consider-using-f-string
121+
122122
print("Connecting to %s" % os.getenv("CIRCUITPY_WIFI_SSID"))
123123
# Show pink while attempting to connect
124124
pixel.fill(PINK)
@@ -127,7 +127,7 @@ def set_pixel_color(distance):
127127
# Show cyan on successful connection
128128
pixel.fill(CYAN)
129129
time.sleep(1) # Brief pause to show the connection success
130-
# pylint: disable=broad-exception-caught
130+
131131
except Exception as e:
132132
print("Failed to connect to WiFi. Error:", e, "\nBoard will hard reset in 30 seconds.")
133133
pixel.fill(OFF)
@@ -233,7 +233,7 @@ def set_pixel_color(distance):
233233

234234
response.close()
235235

236-
# pylint: disable=broad-exception-caught
236+
237237
except Exception as e:
238238
print("Failed to get or send data, or connect. Error:", e,
239239
"\nBoard will hard reset in 30 seconds.")

0 commit comments

Comments
 (0)