modeling/visualization/skillTreeConversion/skill.py
def warnOnCloseMatch(string: str, stringList: list) -> None:
			"""Output a warning if the string is very similar to an element of the stringList."""

			kSimilarityThreshold = 0.9

			matcher = difflib.SequenceMatcher(None, string)
			for secondString in stringList:
				matcher.set_seq2(secondString)
				if matcher.real_quick_ratio() > kSimilarityThreshold and matcher.quick_ratio() > kSimilarityThreshold and matcher.ratio() > kSimilarityThreshold:
					print()
					print(termColors.kBold + "warning: very similar strings encountered:" + termColors.kNormal)
					print('"' + colorizedDiff(string, secondString) + '"')
					print("Are these two strings meant to be the same? Typo? Copy-Paste error?")
Output a warning if the string is very similar to an element of the stringList.
Output a warning if the string is very similar to an element of the stringList.
Output a warning if the string is very similar to an element of the stringList .
def warnOnCloseMatch(string: str, stringList: list) -> None:
			kSimilarityThreshold = 0.9
			matcher = difflib.SequenceMatcher(None, string)
			for secondString in stringList:
				matcher.set_seq2(secondString)
				if matcher.real_quick_ratio() > kSimilarityThreshold and matcher.quick_ratio() > kSimilarityThreshold and matcher.ratio() > kSimilarityThreshold:
					print()
					print(termColors.kBold + "warning: very similar strings encountered:" + termColors.kNormal)
					print('"' + colorizedDiff(string, secondString) + '"')
					print("Are these two strings meant to be the same? Typo? Copy-Paste error?")
def warnOnCloseMatch ( string : str , stringList : list ) -> None : kSimilarityThreshold = 0.9 matcher = difflib . SequenceMatcher ( None , string ) for secondString in stringList : matcher . set_seq2 ( secondString ) if matcher . real_quick_ratio ( ) > kSimilarityThreshold and matcher . quick_ratio ( ) > kSimilarityThreshold and matcher . ratio ( ) > kSimilarityThreshold : print ( ) print ( termColors . kBold + "warning: very similar strings encountered:" + termColors . kNormal ) print ( '"' + colorizedDiff ( string , secondString ) + '"' ) print ( "Are these two strings meant to be the same? Typo? Copy-Paste error?" )
Output a warning if the string is very similar to an element of the stringList.
Output a warning if the string is very similar to an element of the stringList .
"""Output a warning if the string is very similar to an element of the stringList."""
string
str
stringList
list