jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/438062 )
Change subject: Use compiled regex object instead of re.sub ......................................................................
Use compiled regex object instead of re.sub
Change-Id: I231eadde4b6b17955ff4fbf0fd66d6bdfd252faa --- M scripts/solve_disambiguation.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Dvorapa: Looks good to me, but someone else must approve Framawiki: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py index e921b4c..dbbd6f0 100755 --- a/scripts/solve_disambiguation.py +++ b/scripts/solve_disambiguation.py @@ -965,8 +965,8 @@ (len(new_page_title) <= len(link_text)) and (firstcap(link_text[:len(new_page_title)]) == firstcap(new_page_title)) and - (re.sub(self.trailR, '', - link_text[len(new_page_title):]) == '') and + (self.trailR.sub( + '', link_text[len(new_page_title):]) == '') and (not section) ): newlink = "[[%s]]%s" \