File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 18
18
)
19
19
from .pane import Pane
20
20
21
+ if t .TYPE_CHECKING :
22
+ from .server import Server
23
+ from .session import Session
24
+
21
25
logger = logging .getLogger (__name__ )
22
26
23
27
@@ -45,12 +49,12 @@ class Window(TmuxMappingObject, TmuxRelationalObject):
45
49
child_id_attribute = "pane_id"
46
50
#: namespace used :class:`~libtmux.common.TmuxMappingObject`
47
51
formatter_prefix = "window_"
52
+ #: :class:`libtmux.server.Server` window is linked to
53
+ server : "Server"
54
+ #: :class:`libtmux.session.Session` window is linked to
55
+ session : "Session"
48
56
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 ):
54
58
self .session = session
55
59
self .server = self .session .server
56
60
You can’t perform that action at this time.
0 commit comments