Skip to content

Commit 66a9584

Browse files
committed
Return proper type in cookiecutter local extensions
The function should return a `str`, so we make sure we return a `str`. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 4c5667b commit 66a9584

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cookiecutter/local_extensions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def _get_from_json(key: str) -> str:
3737
The string from the cookiecutter.json file.
3838
"""
3939
with open("../cookiecutter.json", encoding="utf8") as cookiecutter_json_file:
40-
return _json.load(cookiecutter_json_file)[key]
40+
return str(_json.load(cookiecutter_json_file)[key])
4141

4242

4343
# Ignoring because cookiecutter simple_filter decorator is not typed.

0 commit comments

Comments
 (0)