From b0e361daf78d989340046186b81be54bee691238 Mon Sep 17 00:00:00 2001 From: alexzvk Date: Tue, 29 Nov 2022 17:21:16 -0500 Subject: [PATCH] now passing all pre-commit checks --- hooks/post_gen_project.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 8111b2b7d..8a2b22c75 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -347,7 +347,8 @@ def handle_licenses(): special_license_files.get(titles_dict[selected_title], "LICENSE"), "w" ) as f: # +2 to get rid of the --- and and an extra new line - f.writelines(contents[contents.index("---\n", 1) + 2:]) + i = contents.index("---\n", 1) + 2 + f.writelines(contents[i:]) shutil.rmtree("licenses")