1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 03:19:47 +03:00

pmb: Use unpacking operator to concatenate collections (MR 2525)

See https://docs.astral.sh/ruff/rules/collection-literal-concatenation

This is also slightly faster according to a microbenchmark that
shows it taking around 19% less time to run:
https://github.com/astral-sh/ruff/pull/1957#issue-1538092351
This commit is contained in:
Newbyte 2025-01-08 13:57:34 +01:00 committed by Oliver Smith
parent 4868cc9548
commit c797b30dfe
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
14 changed files with 29 additions and 33 deletions

View file

@ -76,7 +76,7 @@ def rev_parse(
:returns: commit string like "90cd0ad84d390897efdcf881c0315747a4f3a966"
or (with ``--abbrev-ref``): the branch name, e.g. "master"
"""
command = ["git", "rev-parse"] + extra_args + [revision]
command = ["git", "rev-parse", *extra_args, revision]
rev = pmb.helpers.run.user_output(command, path, output="null" if silent else "log")
return rev.rstrip()