Skip to content

Commit ef32aee

Browse files
fix: avoid shadowing strings parameter in test_speed function
1 parent 20e7e03 commit ef32aee

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

eduu/plugins/sudos.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,16 @@ async def execs(c: Client, m: Message):
141141
async def test_speed(c: Client, m: Message, s: Strings):
142142
string = s("sudos_speedtest")
143143
sent = await m.reply_text(string.format(host="", ping="", download="", upload=""))
144-
s = speedtest.Speedtest()
145-
bs = s.get_best_server()
144+
sp = speedtest.Speedtest()
145+
bs = sp.get_best_server()
146146
await sent.edit_text(
147147
string.format(host=bs["sponsor"], ping=int(bs["latency"]), download="", upload="")
148148
)
149-
dl = round(s.download() / 1024 / 1024, 2)
149+
dl = round(sp.download() / 1024 / 1024, 2)
150150
await sent.edit_text(
151151
string.format(host=bs["sponsor"], ping=int(bs["latency"]), download=dl, upload="")
152152
)
153-
ul = round(s.upload() / 1024 / 1024, 2)
153+
ul = round(sp.upload() / 1024 / 1024, 2)
154154
await sent.edit_text(
155155
string.format(host=bs["sponsor"], ping=int(bs["latency"]), download=dl, upload=ul)
156156
)

0 commit comments

Comments
 (0)