diff --git a/cli/meta/roles/applications/complexity/model.py b/cli/meta/roles/applications/complexity/model.py index d3598d6b36..94286ccdc8 100644 --- a/cli/meta/roles/applications/complexity/model.py +++ b/cli/meta/roles/applications/complexity/model.py @@ -45,7 +45,9 @@ class ComplexityRow(NamedTuple): def _base_hash(name: str, services: list[str]) -> str: members = sorted({name, *services}) - return hashlib.sha1("\n".join(members).encode("utf-8")).hexdigest() + return hashlib.sha1( + "\n".join(members).encode("utf-8"), usedforsecurity=False + ).hexdigest() def _attach_siblings(rows: list[ComplexityRow]) -> list[ComplexityRow]: diff --git a/cli/meta/roles/applications/complexity/render.py b/cli/meta/roles/applications/complexity/render.py index 1684315640..4df42456f0 100644 --- a/cli/meta/roles/applications/complexity/render.py +++ b/cli/meta/roles/applications/complexity/render.py @@ -38,8 +38,7 @@ def render_table(rows: list[ComplexityRow]) -> str: _line([title for title, _, _ in cols]), " ".join("-" * w for w in widths), ] - for i in range(len(rows)): - lines.append(_line([cells[i] for _, _, cells in cols])) + lines.extend(_line([cells[i] for _, _, cells in cols]) for i in range(len(rows))) return "\n".join(lines)