File tree Expand file tree Collapse file tree 4 files changed +25
-5
lines changed Expand file tree Collapse file tree 4 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 3333)
3434
3535if 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
3742
3843 DashLiteral : TypeAlias = t .Literal ["-" ]
3944
Original file line number Diff line number Diff line change 1515logger = logging .getLogger (__name__ )
1616
1717if t .TYPE_CHECKING :
18+ import sys
1819 import types
1920 from collections .abc import Callable , Generator
2021
21- from typing_extensions import Self
22-
2322 from libtmux .server import Server
2423 from libtmux .session import Session
2524 from libtmux .window import Window
2625
26+ if sys .version_info >= (3 , 11 ):
27+ from typing import Self
28+ else :
29+ from typing_extensions import Self
30+
31+
2732TEST_SESSION_PREFIX = "libtmux_"
2833RETRY_TIMEOUT_SECONDS = int (os .getenv ("RETRY_TIMEOUT_SECONDS" , 8 ))
2934RETRY_INTERVAL_SECONDS = float (os .getenv ("RETRY_INTERVAL_SECONDS" , 0.05 ))
Original file line number Diff line number Diff line change 1111from libtmux ._compat import LooseVersion
1212
1313if t .TYPE_CHECKING :
14+ import sys
1415 from collections .abc import Callable
1516
1617 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
1823
1924 VersionCompareOp : TypeAlias = Callable [
2025 [t .Any , t .Any ],
Original file line number Diff line number Diff line change 1111from libtmux ._compat import LooseVersion
1212
1313if t .TYPE_CHECKING :
14+ import sys
1415 from collections .abc import Callable
1516
1617 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
1823
1924 VersionCompareOp : TypeAlias = Callable [
2025 [t .Any , t .Any ],
You can’t perform that action at this time.
0 commit comments