Xqt has submitted this change and it was merged.
Change subject: (Bug 57726) add variant unicode string, not a list ......................................................................
(Bug 57726) add variant unicode string, not a list
Synchronize with core
Change-Id: I18336f11bae2537634b9392ce79936af797d9492 --- M pywikibot/textlib.py 1 file changed, 12 insertions(+), 12 deletions(-)
Approvals: Xqt: Looks good to me, approved
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index ee84235..66b3cf9 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -92,9 +92,9 @@ # Module invocations (currently only Lua) 'invoke': re.compile(r'(?i){{\s*#invoke:.*?}}'), # categories - 'category': re.compile(ur'[[ *(?:%s)\s*:.*?]]' % ur'|'.join(site.namespace(14, all=True))), + 'category': re.compile(u'[[ *(?:%s)\s*:.*?]]' % u'|'.join(site.namespace(14, all=True))), #files - 'file': re.compile(ur'[[ *(?:%s)\s*:.*?]]' % ur'|'.join(site.namespace(6, all=True))), + 'file': re.compile(u'[[ *(?:%s)\s*:.*?]]' % u'|'.join(site.namespace(6, all=True))),
}
@@ -227,8 +227,8 @@ match.group(groupID) + \ replacement[groupMatch.end():]) except IndexError: - print '\nInvalid group reference:', groupID - print 'Groups found:\n', match.groups() + pywikibot.output('\nInvalid group reference: %s' % groupID) + pywikibot.output('Groups found:\n%s' % match.groups()) raise IndexError text = text[:match.start()] + replacement + text[match.end():]
@@ -516,9 +516,9 @@ u'<!-- interwiki at top -->' in oldtext: #do not add separator if interwiki links are on one line newtext = (s + - [u'' - if site.language() in site.family.interwiki_on_one_line - else separator] + + u'' + if site.language() in site.family.interwiki_on_one_line + else separator + s2.replace(marker, '').strip()) else: # calculate what was after the language links on the page @@ -928,12 +928,12 @@ marker4 = findmarker(thistxt, u'§§', u'§')
result = [] - Rmath = re.compile(ur'<math>[^<]+</math>') + Rmath = re.compile(r'<math>[^<]+</math>') Rvalue = re.compile(r'{{{.+?}}}') - Rmarker1 = re.compile(ur'%s(\d+)%s' % (marker1, marker1)) - Rmarker2 = re.compile(ur'%s(\d+)%s' % (marker2, marker2)) - Rmarker3 = re.compile(ur'%s(\d+)%s' % (marker3, marker3)) - Rmarker4 = re.compile(ur'%s(\d+)%s' % (marker4, marker4)) + Rmarker1 = re.compile(r'%s(\d+)%s' % (marker1, marker1)) + Rmarker2 = re.compile(r'%s(\d+)%s' % (marker2, marker2)) + Rmarker3 = re.compile(r'%s(\d+)%s' % (marker3, marker3)) + Rmarker4 = re.compile(r'%s(\d+)%s' % (marker4, marker4))
# Replace math with markers maths = {}
pywikibot-commits@lists.wikimedia.org