jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/592680 )
Change subject: Improvements for replace.py ......................................................................
Improvements for replace.py
Detached from I600816e5a297427159c5bbedad988c0dfd823868
Change-Id: I3b76731f8990e91c0d1132d583be9d8b162f3a3c Signed-off-by: xqt info@gno.de --- M scripts/replace.py 1 file changed, 8 insertions(+), 8 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/replace.py b/scripts/replace.py index 4f7d75d..49da2b5 100755 --- a/scripts/replace.py +++ b/scripts/replace.py @@ -152,7 +152,7 @@ import warnings
import pywikibot -from pywikibot import editor as editarticle +from pywikibot import editor from pywikibot.exceptions import ArgumentDeprecationWarning # Imports predefined replacements tasks from fixes.py from pywikibot import fixes @@ -471,7 +471,7 @@
def isTitleExcepted(self, title): """ - Return True iff one of the exceptions applies for the given title. + Return True if one of the exceptions applies for the given title.
@rtype: bool """ @@ -488,7 +488,7 @@
def isTextExcepted(self, text): """ - Return True iff one of the exceptions applies for the given text. + Return True if one of the exceptions applies for the given text.
@rtype: bool """ @@ -778,15 +778,15 @@ context = context * 3 if context else 3 continue if choice == 'e': - editor = editarticle.TextEditor() - as_edited = editor.edit(original_text) + text_editor = editor.TextEditor() + as_edited = text_editor.edit(original_text) # if user didn't press Cancel if as_edited and as_edited != new_text: new_text = as_edited continue if choice == 'l': - editor = editarticle.TextEditor() - as_edited = editor.edit(new_text) + text_editor = editor.TextEditor() + as_edited = text_editor.edit(new_text) # if user didn't press Cancel if as_edited and as_edited != new_text: new_text = as_edited @@ -880,7 +880,7 @@ 'inside': [], 'inside-tags': [], 'require-title': [], # using a separate requirements dict needs some - } # major refactoring of code. + } # major refactoring of code.
# Should the elements of 'replacements' and 'exceptions' be interpreted # as regular expressions?
pywikibot-commits@lists.wikimedia.org