Skip to content

Commit 4cdec0f

Browse files
committed
fix template identation
1 parent 2347c00 commit 4cdec0f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

recipes/recipe.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ build:
1818

1919
requirements:
2020
run:
21-
{{DEPENDENCIES}}
21+
{{DEPENDENCIES}}
2222

2323
about:
2424
homepage: {{HOMEPAGE}}

scripts/templater.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
repo_dir = os.path.dirname(script_dir)
88
template_path = os.path.join(repo_dir, 'recipes', 'recipe.tmpl')
99

10-
def build_dependency_list(dependencies: dict[str, str]) -> list[str]:
10+
11+
def build_dependency_list(dependencies: dict[str, str]) -> str:
1112
deps: list[str] = []
1213
for name, version in dependencies.items():
1314
start = 0
@@ -20,9 +21,9 @@ def build_dependency_list(dependencies: dict[str, str]) -> list[str]:
2021
operator = version[:2]
2122
start = 2
2223

23-
deps.append(f"- {name} {operator} {version[start:]}")
24+
deps.append(f" - {name} {operator} {version[start:]}")
2425

25-
return deps
26+
return "\n".join(deps)
2627

2728

2829
def main():
@@ -63,7 +64,7 @@ def main():
6364
dependencies = config["feature"][args.mode]["dependencies"]
6465

6566
deps = build_dependency_list(dependencies)
66-
recipe = recipe.replace("{{DEPENDENCIES}}", "\n".join(deps))
67+
recipe = recipe.replace("{{DEPENDENCIES}}", deps)
6768

6869
# Write the final recipe.
6970
with open('recipes/recipe.yaml', 'w+') as f:

0 commit comments

Comments
 (0)