Skip to content

Commit b728361

Browse files
committed
server(fix[tmux_bin]): use is not None guard, remove duplicate assignment
why: "if tmux_bin" is falsy-based and silently treats pathlib.Path("") as None. "is not None" is more explicit and matches the type annotation str | pathlib.Path | None. what: - Change guard from "if tmux_bin" to "if tmux_bin is not None"
1 parent e8621b7 commit b728361

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/libtmux/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def __init__(
143143
**kwargs: t.Any,
144144
) -> None:
145145
EnvironmentMixin.__init__(self, "-g")
146-
self.tmux_bin = str(tmux_bin) if tmux_bin else None
146+
self.tmux_bin = str(tmux_bin) if tmux_bin is not None else None
147147
self._windows: list[WindowDict] = []
148148
self._panes: list[PaneDict] = []
149149

0 commit comments

Comments
 (0)