jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/462308 )
Change subject: [cleanup] cleanup scripts/spamremove.py ......................................................................
[cleanup] cleanup scripts/spamremove.py
- remove preleading "u" from strings - use single quotes for string literals
Change-Id: I425d87718313c9509217a175ca7601150d6e9c63 --- M scripts/spamremove.py 1 file changed, 6 insertions(+), 6 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/spamremove.py b/scripts/spamremove.py index c9d48cf..2ebd7f3 100755 --- a/scripts/spamremove.py +++ b/scripts/spamremove.py @@ -86,7 +86,7 @@ return lines = text.split('\n') newpage = [] - lastok = "" + lastok = '' for line in lines: if self.spam_external_url in line: if lastok: @@ -100,20 +100,20 @@ pywikibot.output(line) lastok = line if self.getOption('always'): - answer = "y" + answer = 'y' else: answer = pywikibot.input_choice( - u'\nDelete the red lines?', + '\nDelete the red lines?', [('yes', 'y'), ('no', 'n'), ('edit', 'e')], 'n', automatic_quit=False) - if answer == "n": + if answer == 'n': return - elif answer == "e": + elif answer == 'e': editor = TextEditor() newtext = editor.edit(text, highlight=self.spam_external_url, jumpIndex=text.find(self.spam_external_url)) else: - newtext = "\n".join(newpage) + newtext = '\n'.join(newpage) if newtext != text: self.put_current(newtext, summary=self.getOption('summary'))
pywikibot-commits@lists.wikimedia.org