[+] fix typing
This commit is contained in:
parent
79f6d3544c
commit
c720465c59
@ -551,11 +551,15 @@ class CLI(abc.ABC):
|
|||||||
name: str
|
name: str
|
||||||
path: Optional[pathlib.Path] = None
|
path: Optional[pathlib.Path] = None
|
||||||
|
|
||||||
def meson_toolchains(self) -> list[meson_toolchains_t.res_t.toolchain_t]:
|
@property
|
||||||
|
def meson_toolchains(self) -> dict[
|
||||||
|
str,
|
||||||
|
meson_toolchains_t.res_t.toolchain_t
|
||||||
|
]:
|
||||||
t1 = pathlib.Path(importlib.import_module('online.fxreader.pr34').__path__[0])
|
t1 = pathlib.Path(importlib.import_module('online.fxreader.pr34').__path__[0])
|
||||||
toolchains = glob.glob(str(t1 / 'meson' / 'toolchains' / '*'))
|
toolchains = glob.glob(str(t1 / 'meson' / 'toolchains' / '*'))
|
||||||
|
|
||||||
res : list[CLI.meson_toolchains_t.res_t.toolchain_t] = []
|
res : dict[str, CLI.meson_toolchains_t.res_t.toolchain_t] = dict()
|
||||||
|
|
||||||
for o in toolchains:
|
for o in toolchains:
|
||||||
entry = self.meson_toolchains_t.res_t.toolchain_t(
|
entry = self.meson_toolchains_t.res_t.toolchain_t(
|
||||||
@ -566,6 +570,8 @@ class CLI(abc.ABC):
|
|||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read(str(entry.path))
|
config.read(str(entry.path))
|
||||||
|
|
||||||
|
res[entry.name] = entry
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
@ -574,6 +580,8 @@ class CLI(abc.ABC):
|
|||||||
extra_args: list[str],
|
extra_args: list[str],
|
||||||
pyproject_tool: PyProject.Tool,
|
pyproject_tool: PyProject.Tool,
|
||||||
) -> list[str]:
|
) -> list[str]:
|
||||||
|
from . import argparse as pr34_argparse
|
||||||
|
|
||||||
if pyproject_tool.meson and pyproject_tool.meson.args and pyproject_tool.meson.args.setup:
|
if pyproject_tool.meson and pyproject_tool.meson.args and pyproject_tool.meson.args.setup:
|
||||||
extra_args = pyproject_tool.meson.args.setup + extra_args
|
extra_args = pyproject_tool.meson.args.setup + extra_args
|
||||||
|
|
||||||
@ -586,7 +594,7 @@ class CLI(abc.ABC):
|
|||||||
type=pathlib.Path,
|
type=pathlib.Path,
|
||||||
)
|
)
|
||||||
|
|
||||||
options, args = pr34_argparse.parse_args(extra_args)
|
options, args = pr34_argparse.parse_args(parser, extra_args)
|
||||||
|
|
||||||
if not options.cross_file is None:
|
if not options.cross_file is None:
|
||||||
if not options.cross_file.exists() and (
|
if not options.cross_file.exists() and (
|
||||||
|
Loading…
Reference in New Issue
Block a user