jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/462714 )
Change subject: [cleanup] cleanup scripts/delete.py ......................................................................
[cleanup] cleanup scripts/delete.py
- use str.format(...) instead of modulo for type specifier arguments. - use single quotes for string literals - remove preleading "u" from strings
Change-Id: If1bf2491274705f33a0a156fd39367205cff0e98 --- M scripts/delete.py 1 file changed, 7 insertions(+), 7 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/delete.py b/scripts/delete.py index 78adda2..ec62481 100755 --- a/scripts/delete.py +++ b/scripts/delete.py @@ -187,7 +187,7 @@ """Process one page from the generator.""" if self.getOption('undelete'): if self.current_page.exists(): - pywikibot.output(u'Skipping: {0} already exists.'.format( + pywikibot.output('Skipping: {0} already exists.'.format( self.current_page)) else: self.current_page.undelete(self.summary) @@ -215,7 +215,7 @@ self.getOption('always'), quit=True) else: - pywikibot.output(u'Skipping: {0} does not exist.'.format( + pywikibot.output('Skipping: {0} does not exist.'.format( self.current_page))
@@ -243,7 +243,7 @@ options['always'] = True elif arg.startswith('-summary'): if len(arg) == len('-summary'): - summary = pywikibot.input(u'Enter a reason for the deletion:') + summary = pywikibot.input('Enter a reason for the deletion:') else: summary = arg[len('-summary:'):] elif arg.startswith('-images'): @@ -292,9 +292,9 @@ # page generator to actually get the text of those pages. if generator: if summary is None: - summary = pywikibot.input(u'Enter a reason for the %sdeletion:' - % ['', 'un'][options.get('undelete', - False)]) + summary = pywikibot.input('Enter a reason for the {}deletion:' + .format(['', 'un'][options + .get('undelete', False)])) bot = DeletionRobot(generator, summary, **options) bot.run() return True @@ -303,5 +303,5 @@ return False
-if __name__ == "__main__": +if __name__ == '__main__': main()