From 8ea6d3298f9b080b1c548a94aba552d526ea2de0 Mon Sep 17 00:00:00 2001 From: Yurely Date: Mon, 26 Aug 2024 15:12:59 -0400 Subject: [PATCH] fix variable --- .../scripts/gen_ref_nav.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/scicookie/{{cookiecutter.project_slug}}/scripts/gen_ref_nav.py b/src/scicookie/{{cookiecutter.project_slug}}/scripts/gen_ref_nav.py index 07cb12f3..48082143 100644 --- a/src/scicookie/{{cookiecutter.project_slug}}/scripts/gen_ref_nav.py +++ b/src/scicookie/{{cookiecutter.project_slug}}/scripts/gen_ref_nav.py @@ -15,12 +15,11 @@ mod_symbol = '' root = Path(__file__).parent.parent -src = {{ cookiecutter.project_layout == "src" }} -{% if cookiecutter.project_layout == "src" -%} -{% set src = root / "src" -%} -{% else -%} -{% set src = cookiecutter.package_slug -%} -{% endif -%} +project_layout = "{{ cookiecutter.project_layout }}" +if project_layout == "src": + src = root / "src" / "{{ cookiecutter.package_slug }}" +else: + src = Path("{{ cookiecutter.package_slug }}") for path in sorted(src.rglob("*.py")): module_path = path.relative_to(src).with_suffix("")