File tree 6 files changed +18
-10
lines changed
6 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ requires = [
8
8
" packaging>=20" ,
9
9
" setuptools>=55" ,
10
10
' tomli; python_version < "3.11"' ,
11
- " typing_extensions" ,
11
+ ' typing_extensions; python_version < "3.8" ' ,
12
12
]
13
13
14
14
[project ]
@@ -45,7 +45,7 @@ dependencies = [
45
45
" packaging>=20" ,
46
46
" setuptools" ,
47
47
' tomli>=1; python_version < "3.11"' ,
48
- " typing-extensions" ,
48
+ ' typing-extensions; python_version < "3.11" ' ,
49
49
]
50
50
[project .optional-dependencies ]
51
51
rich = [
Original file line number Diff line number Diff line change 1
1
from __future__ import annotations
2
2
3
+ import sys
3
4
from typing import Any
4
5
from typing import Callable
5
6
from typing import cast
6
7
from typing import Iterator
7
8
from typing import overload
8
9
from typing import TYPE_CHECKING
9
10
10
- from typing_extensions import Protocol
11
+ if sys .version_info [:2 ] >= (3 , 8 ):
12
+ from typing import Protocol
13
+ else :
14
+ from typing_extensions import Protocol
11
15
12
16
from . import _log
13
17
from . import version
Original file line number Diff line number Diff line change 3
3
import itertools
4
4
import os
5
5
from typing import Callable
6
-
7
- from typing_extensions import TypeGuard
6
+ from typing import TYPE_CHECKING
8
7
9
8
from .. import _log
10
9
from .. import _types as _t
11
10
from .._entrypoints import iter_entry_points
12
11
12
+ if TYPE_CHECKING :
13
+ from typing_extensions import TypeGuard
14
+
15
+
13
16
log = _log .log .getChild ("file_finder" )
14
17
15
18
Original file line number Diff line number Diff line change 7
7
from typing import Callable
8
8
from typing import Dict
9
9
from typing import NamedTuple
10
-
11
- from typing_extensions import TypeAlias
10
+ from typing import TYPE_CHECKING
12
11
13
12
from .setuptools import read_dist_name_from_setup_cfg
14
13
14
+ if TYPE_CHECKING :
15
+ from typing_extensions import TypeAlias
16
+
15
17
_ROOT = "root"
16
18
TOML_RESULT : TypeAlias = Dict [str , Any ]
17
19
TOML_LOADER : TypeAlias = Callable [[str ], TOML_RESULT ]
Original file line number Diff line number Diff line change 8
8
from typing import TYPE_CHECKING
9
9
from typing import Union
10
10
11
- from typing_extensions import TypeAlias
12
11
13
12
if TYPE_CHECKING :
13
+ from typing_extensions import TypeAlias
14
14
from . import version
15
15
16
16
PathT : TypeAlias = Union ["os.PathLike[str]" , str ]
Original file line number Diff line number Diff line change 27
27
pytest
28
28
setuptools >= 45
29
29
virtualenv>20
30
- typing_extensions
31
30
commands =
32
31
pytest []
33
32
39
38
check-manifest
40
39
docutils
41
40
pygments
42
- typing_extensions
41
+ typing_extensions; python_version<'3.8'
43
42
hatchling
44
43
commands =
45
44
rst2html.py README.rst {envlogdir}/README.html --strict []
You can’t perform that action at this time.
0 commit comments