Change parameter name

This commit is contained in:
Simon Hanna 2018-04-17 21:26:18 +02:00
parent de8cbc55d6
commit 9f6999940a
1 changed files with 6 additions and 6 deletions

View File

@ -471,15 +471,15 @@ def get_file_encoding(file_path):
log.exception('Error detecting file encoding') log.exception('Error detecting file encoding')
def normalize_str(string): def normalize_str(irregular_string):
""" """
Normalize the supplied string. Remove unicode control chars and tidy up white space. Normalize the supplied string. Remove unicode control chars and tidy up white space.
:param str string: The string to normalize. :param str irregular_string: The string to normalize.
:return: The normalized string :return: The normalized string
:rtype: str :rtype: str
""" """
string = string.translate(REPLACMENT_CHARS_MAP) irregular_string = irregular_string.translate(REPLACMENT_CHARS_MAP)
string = CONTROL_CHARS.sub('', string) irregular_string = CONTROL_CHARS.sub('', irregular_string)
string = NEW_LINE_REGEX.sub('\n', string) irregular_string = NEW_LINE_REGEX.sub('\n', irregular_string)
return WHITESPACE_REGEX.sub(' ', string) return WHITESPACE_REGEX.sub(' ', irregular_string)