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 6
6
7
7
"""
8
8
import logging
9
+ import typing as t
9
10
10
11
from . import exc
11
12
from .common import TmuxMappingObject , TmuxRelationalObject
12
13
14
+ if t .TYPE_CHECKING :
15
+ from .server import Server
16
+ from .session import Session
17
+ from .window import Window
18
+
19
+
13
20
logger = logging .getLogger (__name__ )
14
21
15
22
@@ -44,11 +51,14 @@ class Pane(TmuxMappingObject, TmuxRelationalObject):
44
51
45
52
#: namespace used :class:`~libtmux.common.TmuxMappingObject`
46
53
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 ):
52
62
self .window = window
53
63
self .session = self .window .session
54
64
self .server = self .session .server
You can’t perform that action at this time.
0 commit comments