Skip to content

Commit 5dbc739

Browse files
committed
pip: Use iterable unpacking to fix RUF005
1 parent 0265822 commit 5dbc739

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pip/flatpak-pip-generator.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ def fprint(string: str) -> None:
316316

317317
tempdir_prefix = f"pip-generator-{output_package}"
318318
with tempfile.TemporaryDirectory(prefix=tempdir_prefix) as tempdir:
319-
pip_download = flatpak_cmd + [
319+
pip_download = [
320+
*flatpak_cmd,
320321
"download",
321322
"--exists-action=i",
322323
"--dest",
@@ -490,15 +491,16 @@ def fprint(string: str) -> None:
490491
with tempfile.TemporaryDirectory(
491492
prefix=f"{tempdir_prefix}-{package.name}"
492493
) as tempdir:
493-
pip_download = flatpak_cmd + [
494+
pip_download = [
495+
*flatpak_cmd,
494496
"download",
495497
"--exists-action=i",
496498
"--dest",
497499
tempdir,
498500
]
499501
try:
500502
print(f"Generating dependencies for {package.name}")
501-
subprocess.run(pip_download + [pkg], check=True, stdout=subprocess.DEVNULL)
503+
subprocess.run([*pip_download, pkg], check=True, stdout=subprocess.DEVNULL)
502504
for filename in sorted(os.listdir(tempdir)):
503505
dep_name = get_package_name(filename)
504506
if (

0 commit comments

Comments
 (0)