File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 1818)
1919from .pane import Pane
2020
21+ if t .TYPE_CHECKING :
22+ from .server import Server
23+ from .session import Session
24+
2125logger = logging .getLogger (__name__ )
2226
2327
@@ -41,16 +45,16 @@ class Window(TmuxMappingObject, TmuxRelationalObject):
4145 https://man.openbsd.org/tmux.1#DESCRIPTION. Accessed April 1st, 2018.
4246 """
4347
44- #: unique child ID key for :class:`~libtmux.common.TmuxRelationalObject`
4548 child_id_attribute = "pane_id"
46- #: namespace used :class:`~libtmux.common.TmuxMappingObject`
49+ """Unique child ID key for :class:`~libtmux.common.TmuxRelationalObject`"""
4750 formatter_prefix = "window_"
51+ """Namespace used for :class:`~libtmux.common.TmuxMappingObject`"""
52+ server : "Server"
53+ """:class:`libtmux.Server` window is linked to"""
54+ session : "Session"
55+ """:class:`libtmux.Session` window is linked to"""
4856
49- def __init__ (self , session = None , ** kwargs ):
50-
51- if not session :
52- raise ValueError ("Window requires a Session, session=Session" )
53-
57+ def __init__ (self , session : "Session" , ** kwargs ):
5458 self .session = session
5559 self .server = self .session .server
5660
You can’t perform that action at this time.
0 commit comments