Skip to content

Commit 969b541

Browse files
committed
chore(session): Add TYPE_CHECKING: Try to avoid circular imports
1 parent d853f05 commit 969b541

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

libtmux/session.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@
1818
has_version,
1919
session_check_name,
2020
)
21-
from .pane import Pane
2221
from .window import Window
2322

23+
if t.TYPE_CHECKING:
24+
from .pane import Pane
25+
26+
2427
logger = logging.getLogger(__name__)
2528

2629

@@ -367,7 +370,7 @@ def select_window(self, target_window: str) -> Window:
367370
return self.attached_window
368371

369372
@property
370-
def attached_pane(self) -> t.Optional[Pane]:
373+
def attached_pane(self) -> t.Optional["Pane"]:
371374
"""Return active :class:`Pane` object."""
372375

373376
return self.attached_window.attached_pane

0 commit comments

Comments
 (0)