Skip to content

Commit a6a16c8

Browse files
committed
Fix conversion of cookiecutter to a named tuple
We need to make sure escape characters don't mess with the json. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 31d7efb commit a6a16c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cookiecutter/hooks/post_gen_project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def to_named_tuple(dictionary: dict[Any, Any], /) -> Any:
3030
return namedtuple("Cookiecutter", filtered.keys())(*filtered.values())
3131

3232

33-
cookiecutter = to_named_tuple(_json.loads("""{{cookiecutter | tojson}}"""))
33+
cookiecutter = to_named_tuple(_json.loads(r"""{{cookiecutter | tojson}}"""))
3434

3535

3636
def main() -> None:

0 commit comments

Comments
 (0)