jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/611673 )
Change subject: Update clean_sandbox for py3 ......................................................................
Update clean_sandbox for py3
Bug: T257399 Change-Id: I4a02589465ec4e57285198de8b5fba209556c60f --- M scripts/clean_sandbox.py 1 file changed, 5 insertions(+), 7 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/clean_sandbox.py b/scripts/clean_sandbox.py index 93c7f91..b7c7959 100755 --- a/scripts/clean_sandbox.py +++ b/scripts/clean_sandbox.py @@ -38,12 +38,10 @@ delay: 7 """ # -# (C) Pywikibot team, 2006-2019 +# (C) Pywikibot team, 2006-2020 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, division, unicode_literals - import datetime import sys import time @@ -157,9 +155,9 @@ 'delay_td': None, # not a real option but __init__ sets it }
- def __init__(self, **kwargs): + def __init__(self, **kwargs) -> None: """Initializer.""" - super(SandboxBot, self).__init__(**kwargs) + super().__init__(**kwargs) if self.getOption('delay') < 0: d = min(15, max(5, int(self.getOption('hours') * 60))) self.availableOptions['delay_td'] = datetime.timedelta(minutes=d) @@ -184,7 +182,7 @@ sys.exit() self.generator = pages
- def run(self): + def run(self) -> None: """Run bot.""" self.site.login() while True: @@ -257,7 +255,7 @@ pywikibot.sleep(self.getOption('hours') * 60 * 60)
-def main(*args): +def main(*args) -> None: """ Process command line arguments and invoke bot.