Skip to content

Commit 274dafe

Browse files
committed
style(ruff): fix E501 by mapping risk_to_dot; keep output identical
1 parent fa26f22 commit 274dafe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/diff_risk_dashboard/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def _load_input(s: str) -> object:
8686
raise SystemExit(f"✗ Not found and not JSON: {s}")
8787

8888

89+
8990
def _render_table(summary: Summary, console: Console) -> None:
9091
if summary.total == 0:
9192
console.print(
@@ -97,9 +98,8 @@ def _render_table(summary: Summary, console: Console) -> None:
9798
)
9899
return
99100

100-
title_dot = (
101-
"🔴" if summary.risk_level == "red" else "🟡" if summary.risk_level == "yellow" else "🟢"
102-
)
101+
risk_to_dot = {"red": "🔴", "yellow": "🟡", "green": "🟢"}
102+
title_dot = risk_to_dot.get(summary.risk_level, "🟢")
103103

104104
table = Table(
105105
title=f"Diff Risk Dashboard {title_dot} — Worst: {summary.worst}",

0 commit comments

Comments
 (0)