openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #32831
Re: [Merge] lp:~thelinuxguy/openlp/fix-newline-bug into lp:openlp
Review: Needs Fixing
See comments inline
lp:~thelinuxguy/openlp/fix-newline-bug (revision 2822)
https://ci.openlp.io/job/Branch-01-Pull/2502/ [SUCCESS]
https://ci.openlp.io/job/Branch-02a-Linux-Tests/2403/ [SUCCESS]
https://ci.openlp.io/job/Branch-02b-macOS-Tests/189/ [FAILURE]
https://ci.openlp.io/job/Branch-03a-Build-Source/101/ [SUCCESS]
https://ci.openlp.io/job/Branch-03b-Build-macOS/94/ [SUCCESS]
https://ci.openlp.io/job/Branch-04a-Code-Analysis/1563/ [SUCCESS]
https://ci.openlp.io/job/Branch-04b-Test-Coverage/1376/ [SUCCESS]
Diff comments:
> === modified file 'openlp/core/common/__init__.py'
> --- openlp/core/common/__init__.py 2018-02-24 16:10:02 +0000
> +++ openlp/core/common/__init__.py 2018-04-17 10:28:19 +0000
> @@ -471,15 +471,15 @@
> log.exception('Error detecting file encoding')
>
>
> -def normalize_str(irreg_str):
> +def normalize_str(string):
Field names of string are not meaningful. irreg_string is more correct
> """
> 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)
--
https://code.launchpad.net/~thelinuxguy/openlp/fix-newline-bug/+merge/343422
Your team OpenLP Core is subscribed to branch lp:openlp.
References