jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/611632 )
Change subject: Update basic for py3 ......................................................................
Update basic for py3
Bug: T257399 Change-Id: I4c4994ea561dbbf46ffd23c275f4dad8bb677abc --- M scripts/basic.py 1 file changed, 5 insertions(+), 7 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/basic.py b/scripts/basic.py index 6ef72ba..e5df728 100755 --- a/scripts/basic.py +++ b/scripts/basic.py @@ -29,12 +29,10 @@ ¶ms; """ # -# (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 pywikibot from pywikibot import pagegenerators
@@ -69,7 +67,7 @@
summary_key = 'basic-changing'
- def __init__(self, generator, **kwargs): + def __init__(self, generator, **kwargs) -> None: """ Initializer.
@@ -87,12 +85,12 @@ })
# call initializer of the super class - super(BasicBot, self).__init__(site=True, **kwargs) + super().__init__(site=True, **kwargs)
# assign the generator to the bot self.generator = generator
- def treat_page(self): + def treat_page(self) -> None: """Load the given page, do some changes, and save it.""" text = self.current_page.text
@@ -124,7 +122,7 @@ self.put_current(text, summary=self.getOption('summary'))
-def main(*args): +def main(*args) -> None: """ Process command line arguments and invoke bot.
pywikibot-commits@lists.wikimedia.org