cmds.projects.CmdCreateFile: Fix double-double quotes

CmdCreateFile creates quotes in- and outside of tmpl_render(), which makes for one too many. Fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-06-02 20:20:27 +02:00
commit 6dfb238364
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -59,15 +59,11 @@ class CmdCreateFile(Cmd): # export
log(WARNING, f'No project directory for module "{m}"') log(WARNING, f'No project directory for module "{m}"')
continue continue
extra_paths.append(path) extra_paths.append(path)
paths = ',\n'.join([f'"{path}"' for path in extra_paths]) values: ListDict = {
values: ListDict = {} 'extra_paths': extra_paths,
kwargs = {
'extra_paths': paths,
} }
self.__update_dict(values, extra_fields) self.__update_dict(values, extra_fields)
self.__update_dict(values, kwargs.items())
kwargs.update(extra_fields)
return tmpl_render( return tmpl_render(
'pyrightconfig.json', values, li_quote = True, li_delimiter = ',\n' 'pyrightconfig.json', values, li_quote = True, li_delimiter = ',\n'
) )