Skip to content

Commit

Permalink
skip splitting on periods representing code or paths, more code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
pnadolny13 committed Jul 27, 2023
1 parent 3421ac0 commit 54f55fa
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions hub_utils/meltano_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 54f55fa

Please sign in to comment.