cmds.projects.lib.templates.tmpl_render(): RenderValues
tmpl_render()'s "values" argument currently understands dict[str,str|list[str]]. Enhance that to understand the broader RenderValues type, which also includes Iterable[tuple[str, str]], as produced by argparse.add_argument(action='append').
This commit also adds proper type-checking for the values argument. Before, its type had gone unchecked entirely.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
841fb8b361
commit
81e71bc5c1
3 changed files with 103 additions and 20 deletions
|
|
@ -65,7 +65,7 @@ class CmdCreateFile(Cmd): # export
|
|||
self.__update_dict(values, extra_fields)
|
||||
|
||||
return tmpl_render(
|
||||
'pyrightconfig.json', values, li_quote = True, li_delimiter = ',\n'
|
||||
'pyrightconfig.json', [values], li_quote = True, li_delimiter = ',\n'
|
||||
)
|
||||
|
||||
def __init__(self, parent: Parent) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue