Skip to content

Commit ef03110

Browse files
committed
fix: fixed pylint notifications
1 parent f771db4 commit ef03110

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

alexs_speedtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import os
12
import threading
23
import tkinter as tk
34
from tkinter import messagebox
45
from tkinter import ttk
56
import speedtest as st
67
import network_adapter_information
7-
import os
88
from test_history import save_test_results, view_history, plot_history
99

1010

test_history.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import json
21
import os
2+
import json
33
from tkinter import Toplevel, Text, Scrollbar, messagebox
44
from matplotlib import pyplot as plt
55

@@ -18,7 +18,7 @@ def save_test_results(download_speed, upload_speed, ping, file_path="test_histor
1818

1919
# If the file exists, load the current data
2020
if os.path.exists(file_path):
21-
with open(file_path, "r") as file:
21+
with open(file_path, "r", encoding="utf-8") as file:
2222
history = json.load(file)
2323
else:
2424
history = []
@@ -27,7 +27,7 @@ def save_test_results(download_speed, upload_speed, ping, file_path="test_histor
2727
history.append(data)
2828

2929
# Save the updated file
30-
with open(file_path, "w") as file:
30+
with open(file_path, "w", encoding="utf-8") as file:
3131
json.dump(history, file, indent=4)
3232

3333

@@ -37,7 +37,7 @@ def view_history(root, history_path):
3737
messagebox.showinfo("History", "No history available.")
3838
return
3939

40-
with open(history_path, "r") as file:
40+
with open(history_path, "r", encoding="utf-8") as file:
4141
history = json.load(file)
4242

4343
# Create a new window to display the history
@@ -71,7 +71,7 @@ def plot_history(root, history_path):
7171
messagebox.showinfo("History", "No history available.")
7272
return
7373

74-
with open(history_path, "r") as file:
74+
with open(history_path, "r", encoding="utf-8") as file:
7575
history = json.load(file)
7676

7777
# Get data for the plot

0 commit comments

Comments
 (0)