Skip to content

Commit 0af87e7

Browse files
committed
ruff(chore): Manual fixes for cli/utils.py via new exceptions
src/tmuxp/cli/utils.py:218:19: TRY003 Avoid specifying long messages outside the exception class src/tmuxp/cli/utils.py:224:19: TRY003 Avoid specifying long messages outside the exception class
1 parent 96fd45b commit 0af87e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tmuxp/cli/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,13 @@ def style(
216216
try:
217217
bits.append(f"\033[{_interpret_color(fg)}m")
218218
except KeyError:
219-
raise TypeError(f"Unknown color {fg!r}") from None
219+
raise UnknownStyleColor(color=fg) from None
220220

221221
if bg:
222222
try:
223223
bits.append(f"\033[{_interpret_color(bg, 10)}m")
224224
except KeyError:
225-
raise TypeError(f"Unknown color {bg!r}") from None
225+
raise UnknownStyleColor(color=bg) from None
226226

227227
if bold is not None:
228228
bits.append(f"\033[{1 if bold else 22}m")

0 commit comments

Comments
 (0)