jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/605965 )
Change subject: [cleanup] remove dontTouchRegexes ......................................................................
[cleanup] remove dontTouchRegexes
dontTouchRegexes points to result. The code is more ugly keeping this double access to result than having a single line from 2008 unchanged.
Change-Id: Ib95131a2b09140a5b5870803b2da3e4cd7061e03 --- M pywikibot/textlib.py 1 file changed, 2 insertions(+), 4 deletions(-)
Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index 9054917..b4e7f36 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -310,8 +310,6 @@ _create_default_regexes()
result = [] - # 'dontTouchRegexes' exist to reduce git blame only. - dontTouchRegexes = result
for exc in keys: if isinstance(exc, UnicodeType): @@ -342,10 +340,10 @@ result.append(_regex_cache[exc]) # handle alias if exc == 'source': - dontTouchRegexes.append(_tag_regex('syntaxhighlight')) + result.append(_tag_regex('syntaxhighlight')) else: # assume it's a regular expression - dontTouchRegexes.append(exc) + result.append(exc)
return result
pywikibot-commits@lists.wikimedia.org