Skip to content

Commit af50745

Browse files
committed
fix: direct .format() usage in exception message
src/libtmux/common.py:423:17: EM103 Exception must not use a `.format()` string directly, assign to variable first
1 parent 94d59c2 commit af50745

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: src/libtmux/common.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -419,13 +419,14 @@ def has_minimum_version(raises: bool = True) -> bool:
419419
"""
420420
if get_version() < LooseVersion(TMUX_MIN_VERSION):
421421
if raises:
422-
raise exc.VersionTooLow(
422+
msg = (
423423
"libtmux only supports tmux {} and greater. This system"
424424
" has {} installed. Upgrade your tmux to use libtmux.".format(
425425
TMUX_MIN_VERSION,
426426
get_version(),
427-
),
427+
)
428428
)
429+
raise exc.VersionTooLow(msg)
429430
else:
430431
return False
431432
return True

0 commit comments

Comments
 (0)