File tree 4 files changed +25
-5
lines changed
4 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 33
33
)
34
34
35
35
if t .TYPE_CHECKING :
36
- from typing_extensions import TypeAlias
36
+ import sys
37
+
38
+ if sys .version_info >= (3 , 10 ):
39
+ from typing import TypeAlias
40
+ else :
41
+ from typing_extensions import TypeAlias
37
42
38
43
DashLiteral : TypeAlias = t .Literal ["-" ]
39
44
Original file line number Diff line number Diff line change 15
15
logger = logging .getLogger (__name__ )
16
16
17
17
if t .TYPE_CHECKING :
18
+ import sys
18
19
import types
19
20
from collections .abc import Callable , Generator
20
21
21
- from typing_extensions import Self
22
-
23
22
from libtmux .server import Server
24
23
from libtmux .session import Session
25
24
from libtmux .window import Window
26
25
26
+ if sys .version_info >= (3 , 11 ):
27
+ from typing import Self
28
+ else :
29
+ from typing_extensions import Self
30
+
31
+
27
32
TEST_SESSION_PREFIX = "libtmux_"
28
33
RETRY_TIMEOUT_SECONDS = int (os .getenv ("RETRY_TIMEOUT_SECONDS" , 8 ))
29
34
RETRY_INTERVAL_SECONDS = float (os .getenv ("RETRY_INTERVAL_SECONDS" , 0.05 ))
Original file line number Diff line number Diff line change 11
11
from libtmux ._compat import LooseVersion
12
12
13
13
if t .TYPE_CHECKING :
14
+ import sys
14
15
from collections .abc import Callable
15
16
16
17
from _pytest .python_api import RaisesContext
17
- from typing_extensions import TypeAlias
18
+
19
+ if sys .version_info >= (3 , 10 ):
20
+ from typing import TypeAlias
21
+ else :
22
+ from typing_extensions import TypeAlias
18
23
19
24
VersionCompareOp : TypeAlias = Callable [
20
25
[t .Any , t .Any ],
Original file line number Diff line number Diff line change 11
11
from libtmux ._compat import LooseVersion
12
12
13
13
if t .TYPE_CHECKING :
14
+ import sys
14
15
from collections .abc import Callable
15
16
16
17
from _pytest .python_api import RaisesContext
17
- from typing_extensions import TypeAlias
18
+
19
+ if sys .version_info >= (3 , 10 ):
20
+ from typing import TypeAlias
21
+ else :
22
+ from typing_extensions import TypeAlias
18
23
19
24
VersionCompareOp : TypeAlias = Callable [
20
25
[t .Any , t .Any ],
You can’t perform that action at this time.
0 commit comments