Skip to content
Snippets Groups Projects
Commit 5b443bb7 authored by Vanessa Stehr's avatar Vanessa Stehr
Browse files

Fix typo

parent a8945280
No related branches found
No related tags found
No related merge requests found
Pipeline #31472 passed
......@@ -258,23 +258,23 @@ def _warn(message: str, warningClass):
warnings.warn(message, warningClass)
return message
def _getClosestStrAndType(unkownStr):
def _getClosestStrAndType(unknownStr):
"""returns the closest string and type of the given string
Args:
unkownStr (str): string to be compared
unknownStr (str): string to be compared
Returns:
str: closest string
str: type of closest string
"""
closestStr = difflib.get_close_matches(unkownStr, _dsiPrefixesLatex.keys(), n=1)
closestStr = difflib.get_close_matches(unknownStr, _dsiPrefixesLatex.keys(), n=1)
if len(closestStr) == 0:
closestStr = difflib.get_close_matches(unkownStr, _dsiUnitsLatex.keys(), n=1)
closestStr = difflib.get_close_matches(unknownStr, _dsiUnitsLatex.keys(), n=1)
if len(closestStr) == 0:
closestStr = difflib.get_close_matches(unkownStr, _dsiKeyWords.keys(), n=1)
closestStr = difflib.get_close_matches(unknownStr, _dsiKeyWords.keys(), n=1)
if len(closestStr) == 0:
return (unkownStr, 'unknown')
return (unknownStr, 'unknown')
else:
return (closestStr[0], 'keyWord')
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment