From 91af45c582d6ec6403f13fce6ca39e04acb076a6 Mon Sep 17 00:00:00 2001 From: Siarhei Siniak Date: Mon, 19 May 2025 13:11:26 +0300 Subject: [PATCH] [+] improve typing --- .../pr34/commands_typed/cli_bootstrap.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/python/online/fxreader/pr34/commands_typed/cli_bootstrap.py b/python/online/fxreader/pr34/commands_typed/cli_bootstrap.py index 0fd3b20..cec9b65 100644 --- a/python/online/fxreader/pr34/commands_typed/cli_bootstrap.py +++ b/python/online/fxreader/pr34/commands_typed/cli_bootstrap.py @@ -265,14 +265,12 @@ def pyproject_load( module.meson = pathlib.Path(o['meson']) if 'tool' in o: - assert isinstance(o['tool'], dict) - - assert all([ - isinstance(o, str) - for o in o['tool'] - ]) - - module.tool.update(o['tool']) + module.tool.update( + check_dict( + o['tool'], + str, + ) + ) res.modules.append(module) @@ -381,7 +379,7 @@ def env_bootstrap( pip_find_links_args = sum([ ['-f', str(o),] for o in pip_find_links - ], []) + ], cast(list[str], [])) features : list[str] = [] @@ -406,7 +404,7 @@ def env_bootstrap( early_dependencies = sum([ pyproject.dependencies[o] for o in pyproject.early_features - ], []) + ], cast(list[str], [])) logger.info(dict( requirements_name_get_res=requirements_name_get_res,