From 54f55fa1ab0c3b87a17193cca7ab7fe428786d55 Mon Sep 17 00:00:00 2001 From: pnadolny13 Date: Wed, 26 Jul 2023 23:03:06 -0400 Subject: [PATCH] skip splitting on periods representing code or paths, more code cleanup --- hub_utils/meltano_util.py | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/hub_utils/meltano_util.py b/hub_utils/meltano_util.py index 584657c..23ae094 100644 --- a/hub_utils/meltano_util.py +++ b/hub_utils/meltano_util.py @@ -359,34 +359,13 @@ def _traverse_schema_properties(schema, field_sep="."): fields.append(i) return fields - # @staticmethod - # def _process_words(word_list, desc_list_clean, capitalize_next): - # for word in word_list: - # if capitalize_next: - # word = word.capitalize() - # capitalize_next = False - # if "." in word: - # # Its at the end - # if word.endswith("."): - # # Add a space after - # word = word + " " - # # index + 1 capitalize - # capitalize_next = True - # desc_list_clean.append(word) - # else: - # word_list = word.split(".") - # MeltanoUtil._process_words(word_list, desc_list_clean, False) - # else: - # desc_list_clean.append(word) - # return desc_list_clean - @staticmethod def _split_sentence_endings(word_list): desc_list_clean = [] for word in word_list: if len(word.split(".")) > 1: if not any( - keyword in word for keyword in ("http", "ssh", "ssl", "e.g.") + keyword in word for keyword in ("http", "ssh", "ssl", "e.g.", '"', "`") ): desc_list_clean.extend(word.replace(".", ". ").split()) continue