File tree 5 files changed +24
-10
lines changed
5 files changed +24
-10
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ $ pip install --user --upgrade --pre libtmux
15
15
16
16
- _ Future release notes will be placed here_
17
17
18
+ ### Bug fix
19
+
20
+ - Fix ` typing_extensions ` issue by wrapping it in ` TYPE_CHECKING ` , continuation of #564 , via #572 .
21
+
18
22
### Development
19
23
20
24
- Improved test organization and coverage in ` test_common.py ` (#570 ):
Original file line number Diff line number Diff line change 13
13
import typing as t
14
14
import warnings
15
15
16
- from typing_extensions import Self
17
-
18
16
from libtmux .common import has_gte_version , has_lt_version , tmux_cmd
19
17
from libtmux .constants import (
20
18
PANE_DIRECTION_FLAG_MAP ,
28
26
from . import exc
29
27
30
28
if t .TYPE_CHECKING :
29
+ import sys
31
30
import types
32
31
33
32
from .server import Server
34
33
from .session import Session
35
34
from .window import Window
36
35
36
+ if sys .version_info >= (3 , 11 ):
37
+ from typing import Self
38
+ else :
39
+ from typing_extensions import Self
37
40
38
41
logger = logging .getLogger (__name__ )
39
42
Original file line number Diff line number Diff line change 15
15
import typing as t
16
16
import warnings
17
17
18
- from typing_extensions import Self
19
-
20
18
from libtmux ._internal .query_list import QueryList
21
19
from libtmux .common import tmux_cmd
22
20
from libtmux .neo import fetch_objs
39
37
import types
40
38
41
39
if sys .version_info >= (3 , 10 ):
42
- from typing import TypeAlias
40
+ from typing import Self , TypeAlias
43
41
else :
44
- from typing_extensions import TypeAlias
42
+ from typing_extensions import Self , TypeAlias
45
43
46
44
DashLiteral : TypeAlias = t .Literal ["-" ]
47
45
Original file line number Diff line number Diff line change 13
13
import typing as t
14
14
import warnings
15
15
16
- from typing_extensions import Self
17
-
18
16
from libtmux ._internal .query_list import QueryList
19
17
from libtmux .constants import WINDOW_DIRECTION_FLAG_MAP , WindowDirection
20
18
from libtmux .formats import FORMAT_SEPARATOR
33
31
)
34
32
35
33
if t .TYPE_CHECKING :
34
+ import sys
36
35
import types
37
36
38
37
from libtmux .common import tmux_cmd
39
38
39
+ if sys .version_info >= (3 , 11 ):
40
+ from typing import Self
41
+ else :
42
+ from typing_extensions import Self
43
+
40
44
from .server import Server
41
45
42
46
Original file line number Diff line number Diff line change 13
13
import typing as t
14
14
import warnings
15
15
16
- from typing_extensions import Self
17
-
18
16
from libtmux ._internal .query_list import QueryList
19
17
from libtmux .common import has_gte_version , tmux_cmd
20
18
from libtmux .constants import (
30
28
from .common import PaneDict , WindowOptionDict , handle_option_error
31
29
32
30
if t .TYPE_CHECKING :
31
+ import sys
33
32
import types
34
33
35
34
from .server import Server
36
35
from .session import Session
37
36
37
+ if sys .version_info >= (3 , 11 ):
38
+ from typing import Self
39
+ else :
40
+ from typing_extensions import Self
41
+
42
+
38
43
logger = logging .getLogger (__name__ )
39
44
40
45
You can’t perform that action at this time.
0 commit comments