From 5045d51df45a7e75fe5055409a07484cc39d5142 Mon Sep 17 00:00:00 2001 From: Simon Hanna Date: Sat, 14 Apr 2018 21:53:35 +0200 Subject: [PATCH] Give the parameter an easier name --- openlp/core/common/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openlp/core/common/__init__.py b/openlp/core/common/__init__.py index 79f08cd39..fb2574b70 100644 --- a/openlp/core/common/__init__.py +++ b/openlp/core/common/__init__.py @@ -471,15 +471,15 @@ def get_file_encoding(file_path): log.exception('Error detecting file encoding') -def normalize_str(irreg_str): +def normalize_str(string): """ Normalize the supplied string. Remove unicode control chars and tidy up white space. - :param str irreg_str: The string to normalize. + :param str string: The string to normalize. :return: The normalized string :rtype: str """ - irreg_str = irreg_str.translate(REPLACMENT_CHARS_MAP) - irreg_str = CONTROL_CHARS.sub('', irreg_str) - irreg_str = NEW_LINE_REGEX.sub('\n', irreg_str) - return WHITESPACE_REGEX.sub(' ', irreg_str) + string = string.translate(REPLACMENT_CHARS_MAP) + string = CONTROL_CHARS.sub('', string) + string = NEW_LINE_REGEX.sub('\n', string) + return WHITESPACE_REGEX.sub(' ', string)