File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change 1616from datetime import timedelta
1717from enum import Enum
1818from enum import unique
19- from functools import reduce
2019from io import BytesIO
2120from pathlib import Path
2221from typing import ClassVar
@@ -186,7 +185,7 @@ def __post_init__(self) -> None:
186185 self .branch_name = (
187186 self .deployment_branch_name
188187 + "-"
189- + "" .join (random .choice (string .ascii_letters ) for _ in range ( 5 ))
188+ + "" .join (random .choices (string .ascii_letters , k = 5 ))
190189 )
191190
192191 if not self .osc_username :
@@ -832,17 +831,7 @@ def _get_changed_packages_by_commit(self, commit: str | git.Commit) -> list[str]
832831 packages .append (b_path [0 ])
833832
834833 res = list (set (packages ))
835-
836- # it can happen that we only update a non-BCI package file,
837- # e.g. .obs/workflows.yml, then we will have a commit, but the diff will
838- # not touch any BCI and thus `res` will be an empty list
839- # => give reduce an initial value (last parameter) as it will otherwise
840- # fail
841- assert reduce (
842- lambda folder_a , folder_b : folder_a and folder_b ,
843- (pkg in bci_pkg_names for pkg in res ),
844- True ,
845- )
834+ assert all (pkg in bci_pkg_names for pkg in res )
846835 return res
847836
848837 async def _run_git_action_in_worktree (
You can’t perform that action at this time.
0 commit comments