jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/642809 )
Change subject: [bugfix] Fix available_options and purge options in touch.py ......................................................................
[bugfix] Fix available_options and purge options in touch.py
Bug: T268394 Change-Id: I6a65f76e670780e2f3811fa2a9d4c8e9fb219a35 --- M scripts/touch.py 1 file changed, 9 insertions(+), 13 deletions(-)
Approvals: JJMC89: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/touch.py b/scripts/touch.py index fa02796..ec8014c 100755 --- a/scripts/touch.py +++ b/scripts/touch.py @@ -67,22 +67,18 @@
"""Purge each page on the generator."""
- def __init__(self, generator, **kwargs) -> None: - """Initialize a PurgeBot instance with the options and generator.""" - self.available_options = { - 'converttitles': None, - 'forcelinkupdate': None, - 'forcerecursivelinkupdate': None, - 'redirects': None - } - super().__init__(generator=generator, **kwargs) + available_options = { + 'converttitles': None, + 'forcelinkupdate': None, + 'forcerecursivelinkupdate': None, + 'redirects': None + }
def treat(self, page) -> None: """Purge the given page.""" - pywikibot.output('Page {0}{1} purged'.format( - page.title(as_link=True), - '' if page.purge(**self.options) else ' not' - )) + pywikibot.output('Page {}{} purged' + .format(page, + '' if page.purge(**self.opt) else ' not'))
def main(*args) -> None:
pywikibot-commits@lists.wikimedia.org