[+] improve typing

This commit is contained in:
Siarhei Siniak 2025-05-19 13:16:08 +03:00
parent 91af45c582
commit cc506baa9e

@ -20,6 +20,10 @@ from typing import (
MutableMapping, MutableMapping,
) )
from typing_extensions import (
cast,
)
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@dataclasses.dataclass @dataclasses.dataclass
@ -158,7 +162,7 @@ class CLI(abc.ABC):
dependencies = sum([ dependencies = sum([
pyproject.dependencies[o] pyproject.dependencies[o]
for o in features for o in features
], []) ], cast(list[str], []))
pip_find_links : list[pathlib.Path] = [] pip_find_links : list[pathlib.Path] = []
@ -178,7 +182,7 @@ class CLI(abc.ABC):
*sum([ *sum([
['-f', str(o),] ['-f', str(o),]
for o in pip_find_links for o in pip_find_links
], []), ], cast(list[str], [])),
# '-f', str(pathlib.Path(__file__).parent / 'deps' / 'dist'), # '-f', str(pathlib.Path(__file__).parent / 'deps' / 'dist'),
'--offline', '--offline',
*dependencies, *dependencies,
@ -599,7 +603,7 @@ class CLI(abc.ABC):
dependencies = sum([ dependencies = sum([
pyproject.dependencies[o] pyproject.dependencies[o]
for o in options.features for o in options.features
], []) ], cast(list[str], []))
pip_find_links : list[pathlib.Path] = [] pip_find_links : list[pathlib.Path] = []
@ -641,7 +645,7 @@ class CLI(abc.ABC):
*sum([ *sum([
['-f', str(o),] ['-f', str(o),]
for o in pip_find_links for o in pip_find_links
], []), ], cast(list[str], [])),
'--generate-hashes', '--generate-hashes',
str(requirements_name_get_res.not_compiled), str(requirements_name_get_res.not_compiled),
'-o', '-o',