Skip to content

Commit 40210f8

Browse files
authored
Fix used-dummy-variable ruff warnings (#3083)
1 parent 9163e8c commit 40210f8

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

archinstall/lib/installer.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ def _verify_service_stop(self) -> None:
147147
if not storage['arguments'].get('skip_ntp', False):
148148
info(_('Waiting for time sync (timedatectl show) to complete.'))
149149

150-
_started_wait = time.time()
151-
_notified = False
150+
started_wait = time.time()
151+
notified = False
152152
while True:
153-
if not _notified and time.time() - _started_wait > 5:
154-
_notified = True
153+
if not notified and time.time() - started_wait > 5:
154+
notified = True
155155
warn(
156156
_("Time synchronization not completing, while you wait - check the docs for workarounds: https://archinstall.readthedocs.io/"))
157157

archinstall/lib/models/mirrors.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def speed(self) -> float:
4848
elif self._speedtest_retries < 1:
4949
self._speedtest_retries = 1
5050

51-
_retry = 0
52-
while _retry < self._speedtest_retries and self._speed is None:
51+
retry = 0
52+
while retry < self._speedtest_retries and self._speed is None:
5353
debug(f"Checking download speed of {self._hostname}[{self.score}] by fetching: {self.url}core/os/x86_64/core.db")
5454
req = urllib.request.Request(url=f"{self.url}core/os/x86_64/core.db")
5555

@@ -71,7 +71,7 @@ def speed(self) -> float:
7171
debug(f" speed: <undetermined> ({error}), skip")
7272
self._speed = 0
7373

74-
_retry += 1
74+
retry += 1
7575

7676
if self._speed is None:
7777
self._speed = 0
@@ -103,8 +103,8 @@ def validate_score(cls, value: int) -> int | None:
103103

104104
@model_validator(mode='after')
105105
def debug_output(self, validation_info) -> 'MirrorStatusEntryV3':
106-
self._hostname, *_port = urllib.parse.urlparse(self.url).netloc.split(':', 1)
107-
self._port = int(_port[0]) if _port and len(_port) >= 1 else None
106+
self._hostname, *port = urllib.parse.urlparse(self.url).netloc.split(':', 1)
107+
self._port = int(port[0]) if port and len(port) >= 1 else None
108108

109109
debug(f"Loaded mirror {self._hostname}" + (f" with current score of {round(self.score)}" if self.score else ''))
110110
return self

0 commit comments

Comments
 (0)