Skip to content

Commit a92e905

Browse files
authored
Merge pull request #733 from mathoudebine/fix/linter-issues
Fix Lint issues
2 parents b3f08b8 + 8e0243a commit a92e905

File tree

4 files changed

+0
-10
lines changed

4 files changed

+0
-10
lines changed

library/config.py

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def load_theme():
6868

6969

7070
def check_theme_compatible(display_size: str):
71-
global THEME_DATA
7271
# Check if theme is compatible with hardware revision
7372
if display_size != THEME_DATA['display'].get("DISPLAY_SIZE", '3.5"'):
7473
logger.error("The selected theme " + CONFIG_DATA['config'][

library/scheduler.py

-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def decorator(func):
5656

5757
def periodic(scheduler, periodic_interval, action, actionargs=()):
5858
""" Wrap the scheduler with our periodic interval """
59-
global STOPPING
6059
if not STOPPING:
6160
# If the program is not stopping: re-schedule the task for future execution
6261
scheduler.enter(periodic_interval, 1, periodic,
@@ -188,7 +187,6 @@ def PingStats():
188187
@schedule(timedelta(milliseconds=1).total_seconds())
189188
def QueueHandler():
190189
# Do next action waiting in the queue
191-
global STOPPING
192190
if STOPPING:
193191
# Empty the action queue to allow program to exit cleanly
194192
while not config.update_queue.empty():

library/sensors/sensors_python.py

-5
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ class Gpu(sensors.Gpu):
175175
@staticmethod
176176
def stats() -> Tuple[
177177
float, float, float, float, float]: # load (%) / used mem (%) / used mem (Mb) / total mem (Mb) / temp (°C)
178-
global DETECTED_GPU
179178
if DETECTED_GPU == GpuType.AMD:
180179
return GpuAmd.stats()
181180
elif DETECTED_GPU == GpuType.NVIDIA:
@@ -185,7 +184,6 @@ def stats() -> Tuple[
185184

186185
@staticmethod
187186
def fps() -> int:
188-
global DETECTED_GPU
189187
if DETECTED_GPU == GpuType.AMD:
190188
return GpuAmd.fps()
191189
elif DETECTED_GPU == GpuType.NVIDIA:
@@ -195,7 +193,6 @@ def fps() -> int:
195193

196194
@staticmethod
197195
def fan_percent() -> float:
198-
global DETECTED_GPU
199196
if DETECTED_GPU == GpuType.AMD:
200197
return GpuAmd.fan_percent()
201198
elif DETECTED_GPU == GpuType.NVIDIA:
@@ -205,7 +202,6 @@ def fan_percent() -> float:
205202

206203
@staticmethod
207204
def frequency() -> float:
208-
global DETECTED_GPU
209205
if DETECTED_GPU == GpuType.AMD:
210206
return GpuAmd.frequency()
211207
elif DETECTED_GPU == GpuType.NVIDIA:
@@ -471,7 +467,6 @@ class Net(sensors.Net):
471467
@staticmethod
472468
def stats(if_name, interval) -> Tuple[
473469
int, int, int, int]: # up rate (B/s), uploaded (B), dl rate (B/s), downloaded (B)
474-
global PNIC_BEFORE
475470
try:
476471
# Get current counters
477472
pnic_after = psutil.net_io_counters(pernic=True)

theme-editor.py

-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ def on_button1_press(event):
163163

164164

165165
def on_button1_press_and_drag(event):
166-
global x0, y0
167166
display_width, display_height = int(display.lcd.get_width() / RESIZE_FACTOR), int(
168167
display.lcd.get_height() / RESIZE_FACTOR)
169168
x1, y1 = event.x, event.y
@@ -186,7 +185,6 @@ def on_button1_press_and_drag(event):
186185

187186

188187
def on_button1_release(event):
189-
global x0, y0
190188
display_width, display_height = int(display.lcd.get_width() / RESIZE_FACTOR), int(
191189
display.lcd.get_height() / RESIZE_FACTOR)
192190
x1, y1 = event.x, event.y

0 commit comments

Comments
 (0)