File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 66
77"""
88import logging
9+ import typing as t
910
1011from . import exc
1112from .common import TmuxMappingObject , TmuxRelationalObject
1213
14+ if t .TYPE_CHECKING :
15+ from .server import Server
16+ from .session import Session
17+ from .window import Window
18+
19+
1320logger = logging .getLogger (__name__ )
1421
1522
@@ -44,11 +51,14 @@ class Pane(TmuxMappingObject, TmuxRelationalObject):
4451
4552 #: namespace used :class:`~libtmux.common.TmuxMappingObject`
4653 formatter_prefix = "pane_"
47-
48- def __init__ (self , window = None , ** kwargs ):
49- if not window :
50- raise ValueError ("Pane must have ``Window`` object" )
51-
54+ #: :class:`libtmux.window.Window` pane is linked to
55+ window : "Window"
56+ #: :class:`libtmux.session.Session` pane is linked to
57+ session : "Session"
58+ #: :class:`libtmux.server.Server` pane is linked to
59+ server : "Server"
60+
61+ def __init__ (self , window : "Window" , ** kwargs ):
5262 self .window = window
5363 self .session = self .window .session
5464 self .server = self .session .server
You can’t perform that action at this time.
0 commit comments