From 03b4d9669bb7a5bdd296ebda804c5f18d6bd9b2c Mon Sep 17 00:00:00 2001 From: adamdavis2 Date: Wed, 20 Apr 2022 10:57:13 +1000 Subject: [PATCH] fixed extra space in comment --- clean_ttl_hook/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/clean_ttl_hook/main.py b/clean_ttl_hook/main.py index b6adfe3..15c6932 100644 --- a/clean_ttl_hook/main.py +++ b/clean_ttl_hook/main.py @@ -10,17 +10,16 @@ # removes unused namespace entries and re-serializes a graph with the prefixes in sorted order def clean_ttl(input_file_path: Path): # get a list of all leading comments in the file - input_file_path = Path(input_file_path) comments_list = [] comment_flag = False with open(input_file_path, "r", encoding="utf-8", errors="ignore") as f: for index, line in enumerate(f): if len(line.strip()) > 0 and line.strip()[0] == "#" and index == 0: - comments_list.append(line.strip()[1:]) + comments_list.append(line.strip()[2:]) comment_flag = True elif len(line.strip()) > 0 and line.strip()[0] == "#" and comment_flag: - comments_list.append(line.strip()[1:]) + comments_list.append(line.strip()[2:]) elif len(line.strip()) > 0 and line.strip()[0] != "#": comment_flag = False