Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f2bc27a

Browse files
committed
feat(Server): Use OptionsMixin for Server.set_option, Server.show_option(s)
1 parent c34a6b4 commit f2bc27a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/libtmux/server.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
from libtmux._internal.query_list import QueryList
1919
from libtmux.common import tmux_cmd
20+
from libtmux.constants import OptionScope
2021
from libtmux.neo import fetch_objs
2122
from libtmux.pane import Pane
2223
from libtmux.session import Session
@@ -31,6 +32,7 @@
3132
has_gte_version,
3233
session_check_name,
3334
)
35+
from .options import OptionsMixin
3436

3537
if t.TYPE_CHECKING:
3638
import sys
@@ -46,7 +48,7 @@
4648
logger = logging.getLogger(__name__)
4749

4850

49-
class Server(EnvironmentMixin):
51+
class Server(EnvironmentMixin, OptionsMixin):
5052
""":term:`tmux(1)` :term:`Server` [server_manual]_.
5153
5254
- :attr:`Server.sessions` [:class:`Session`, ...]
@@ -119,6 +121,9 @@ class Server(EnvironmentMixin):
119121
formatter_prefix = "server_"
120122
"""Namespace used for :class:`~libtmux.common.TmuxMappingObject`"""
121123

124+
default_option_scope: OptionScope | None = OptionScope.Server
125+
"""For option management."""
126+
122127
def __init__(
123128
self,
124129
socket_name: str | None = None,

0 commit comments

Comments
 (0)