Skip to content

Commit 943980a

Browse files
committed
feat(common): Add CmdMixin, CmdProtocol
1 parent a4803d9 commit 943980a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/libtmux/common.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,20 @@ def _check_deprecated_version(version: LooseVersion) -> None:
6868
)
6969

7070

71+
class CmdProtocol(t.Protocol):
72+
"""Command protocol for tmux command."""
73+
74+
def __call__(self, cmd: str, *args: t.Any, **kwargs: t.Any) -> tmux_cmd:
75+
"""Wrap tmux_cmd."""
76+
...
77+
78+
79+
class CmdMixin:
80+
"""Command mixin for tmux command."""
81+
82+
cmd: CmdProtocol
83+
84+
7185
class EnvironmentMixin:
7286
"""Mixin for manager session and server level environment variables in tmux."""
7387

0 commit comments

Comments
 (0)