From 6005acace4fdd158f434ee0c0c09f2d2fc0c26be Mon Sep 17 00:00:00 2001 From: ahmed531998 Date: Sat, 15 Apr 2023 19:11:30 +0200 Subject: [PATCH] syntax_fix --- VRE.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/VRE.py b/VRE.py index 73b5e9e..c23b1f7 100644 --- a/VRE.py +++ b/VRE.py @@ -278,6 +278,10 @@ class VRE: if not paper_df.empty or not dataset_df.empty or not content_df.empty or not post_df.empty: self.new_income = True + def remove_suffix(self, input_string, suffix): + if suffix and input_string.endswith(suffix): + return input_string[:-len(suffix)] + return input_string def remove_useless_dots(self, line): modline = '' @@ -339,7 +343,7 @@ class VRE: if j+1 < len(splits): splits[j] = splits[j]+'. ' if j == len(splits)-1: - splits[j] = splits[j].removesuffix('-') + splits[j] = self.remove_suffix(splits[j], '-') #splits[j].removesuffix('-') return splits, i+1 else: return [], i+1