Skip to content

Commit 585bf1d

Browse files
committed
ruff
1 parent c916506 commit 585bf1d

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

installation_and_upgrade/IBEX_upgrade.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from ibex_install_utils.user_prompt import UserPrompt
1717

1818

19-
def _get_latest_release_path(release_dir):
19+
def _get_latest_release_path(release_dir: str) -> str:
2020
regex = re.compile(r"^\d+\.\d+\.\d+$")
2121

2222
releases = [
@@ -32,7 +32,7 @@ def _get_latest_release_path(release_dir):
3232
return os.path.join(release_dir, f"{current_release}")
3333

3434

35-
def _get_latest_existing_dir_path(release_dir, component):
35+
def _get_latest_existing_dir_path(release_dir: str, component: str) -> str:
3636
regex = re.compile(r"^\d+\.\d+\.\d+$")
3737

3838
releases = [
@@ -171,8 +171,8 @@ def _get_latest_existing_dir_path(release_dir, component):
171171
)
172172
except UserStop:
173173
print(
174-
"To specify the directory you want use --server_dir, --client_dir, and --genie_python3_dir "
175-
"when running the IBEX_upgrade.py script."
174+
"To specify the directory you want use --server_dir, --client_dir, and"
175+
" --genie_python3_dir when running the IBEX_upgrade.py script."
176176
)
177177
sys.exit(2)
178178

installation_and_upgrade/ibex_install_utils/tasks/system_tasks.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import glob
22
import os
3-
import platform
43
import shutil
54
import subprocess
65
import time
@@ -434,7 +433,7 @@ def install_or_upgrade_vc_redist(self) -> None:
434433

435434
print(f"Installing vc_redist for arch: {arch}")
436435

437-
files_to_run = [f"vc_redist.x64.exe"]
436+
files_to_run = ["vc_redist.x64.exe"]
438437
if arch == "x86":
439438
files_to_run.insert(0, "vc_redist.x86.exe")
440439
for file in files_to_run:
@@ -444,8 +443,8 @@ def install_or_upgrade_vc_redist(self) -> None:
444443
VAR_DIR, "logs", "deploy", f"vc_redist_log{time.strftime('%Y%m%d%H%M%S')}.txt"
445444
)
446445

447-
# AdminRunner doesn't seem to work here, saying it can't find a handle, so just run as a
448-
# normal command as the process itself prompts for admin.
446+
# AdminRunner doesn't seem to work here, saying it can't find a handle, so just
447+
# run as a normal command as the process itself prompts for admin.
449448
RunProcess(
450449
working_dir=str(exe_file.parent),
451450
executable_file=exe_file.name,
@@ -460,8 +459,8 @@ def install_or_upgrade_vc_redist(self) -> None:
460459
expected_return_codes=[0],
461460
).run()
462461

463-
# vc_redist helpfully finishes with errorlevel 0 before actually copying the files over.
464-
# therefore we'll sleep for 5 seconds here
462+
# vc_redist helpfully finishes with errorlevel 0 before actually
463+
# copying the files over, therefore we'll sleep for 5 seconds here
465464
print("waiting for install to finish")
466465
sleep(5)
467466

0 commit comments

Comments
 (0)