File tree 4 files changed +24
-5
lines changed
4 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 35
35
)
36
36
37
37
if t .TYPE_CHECKING :
38
+ import sys
38
39
import types
39
40
40
- from typing_extensions import TypeAlias
41
+ if sys .version_info >= (3 , 10 ):
42
+ from typing import TypeAlias
43
+ else :
44
+ from typing_extensions import TypeAlias
41
45
42
46
DashLiteral : TypeAlias = t .Literal ["-" ]
43
47
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