Skip to content

Commit 1d46d79

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 b1c3ade commit 1d46d79

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
@@ -409,13 +409,14 @@ def has_minimum_version(raises: bool = True) -> bool:
409409
"""
410410
if get_version() < LooseVersion(TMUX_MIN_VERSION):
411411
if raises:
412-
raise exc.VersionTooLow(
412+
msg = (
413413
"libtmux only supports tmux {} and greater. This system"
414414
" has {} installed. Upgrade your tmux to use libtmux.".format(
415415
TMUX_MIN_VERSION,
416416
get_version(),
417-
),
417+
)
418418
)
419+
raise exc.VersionTooLow(msg)
419420
else:
420421
return False
421422
return True

0 commit comments

Comments
 (0)