jenkins-bot merged this change.

View Change

Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
[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(-)

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


To view, visit change 605965. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib95131a2b09140a5b5870803b2da3e4cd7061e03
Gerrit-Change-Number: 605965
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: jenkins-bot (75)