Skip to content

Import tweaks #384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions libtmux/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@
has_version,
session_check_name,
)
from .pane import Pane
from .window import Window

if t.TYPE_CHECKING:
from .pane import Pane


logger = logging.getLogger(__name__)


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

@property
def attached_pane(self) -> t.Optional[Pane]:
def attached_pane(self) -> t.Optional["Pane"]:
"""Return active :class:`Pane` object."""

return self.attached_window.attached_pane
Expand Down
Empty file added tests/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion tests/test_server.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Test for libtmux Server object."""
import logging

from libtmux import Server
from libtmux.common import has_gte_version
from libtmux.server import Server

logger = logging.getLogger(__name__)

Expand Down
5 changes: 4 additions & 1 deletion tests/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@

import pytest

from libtmux import Pane, Session, Window, exc
from libtmux import exc
from libtmux.common import has_gte_version
from libtmux.pane import Pane
from libtmux.session import Session
from libtmux.test import TEST_SESSION_PREFIX, namer
from libtmux.window import Window

logger = logging.getLogger(__name__)

Expand Down
4 changes: 3 additions & 1 deletion tests/test_tmuxobject.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
"""Tests for libtmux TmuxRelationalObject and TmuxMappingObject."""
import logging

from libtmux import Pane, Session, Window
from libtmux.pane import Pane
from libtmux.session import Session
from libtmux.test import TEST_SESSION_PREFIX, namer
from libtmux.window import Window

logger = logging.getLogger(__name__)

Expand Down
5 changes: 4 additions & 1 deletion tests/test_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@

import pytest

from libtmux import Pane, Server, Window, exc
from libtmux import exc
from libtmux.common import has_gte_version
from libtmux.pane import Pane
from libtmux.server import Server
from libtmux.window import Window

logger = logging.getLogger(__name__)

Expand Down