From 232bc5044b7cfd8ee45149300ea884357bdf0fac Mon Sep 17 00:00:00 2001 From: evilchili Date: Fri, 12 Apr 2024 10:52:14 -0700 Subject: [PATCH] normalize package names for templates --- src/poetry_slam/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/poetry_slam/cli.py b/src/poetry_slam/cli.py index c294f2e..538c446 100644 --- a/src/poetry_slam/cli.py +++ b/src/poetry_slam/cli.py @@ -78,10 +78,11 @@ def new( """ Initialize a project with boilerplate code. """ + package_name = project_name.lower().replace('-', '_') tmpl = templates()[template.name] tmpl.values = { 'PROJECT_NAME': project_name, - 'PACKAGE_NAME': project_name, + 'PACKAGE_NAME': package_name, 'DESCRIPTION': f"{project_name}: automatically generated by poetry-slam.", 'AUTHOR_NAME': os.environ['USER'] }