jenkins-bot submitted this change.
Update cosmetic_changes for py3
Bug: T257399
Change-Id: I675fe225ed4258cd3de5ac2392955498d73fc4b1
---
M scripts/cosmetic_changes.py
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/scripts/cosmetic_changes.py b/scripts/cosmetic_changes.py
index 3069bcb..a826608 100644
--- a/scripts/cosmetic_changes.py
+++ b/scripts/cosmetic_changes.py
@@ -28,12 +28,10 @@
For further information see pywikibot/cosmetic_changes.py
"""
#
-# (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 config, cosmetic_changes, i18n, pagegenerators
@@ -56,18 +54,18 @@
"""Cosmetic changes bot."""
- def __init__(self, generator, **kwargs):
+ def __init__(self, generator, **kwargs) -> None:
"""Initializer."""
self.availableOptions.update({
'async': False,
'summary': 'Robot: Cosmetic changes',
'ignore': cosmetic_changes.CANCEL_ALL,
})
- super(CosmeticChangesBot, self).__init__(**kwargs)
+ super().__init__(**kwargs)
self.generator = generator
- def treat_page(self):
+ def treat_page(self) -> None:
"""Treat page with the cosmetic toolkit."""
cc_toolkit = cosmetic_changes.CosmeticChangesToolkit.from_page(
self.current_page, ignore=self.getOption('ignore'))
@@ -78,7 +76,7 @@
asynchronous=self.getOption('async'))
-def main(*args):
+def main(*args) -> None:
"""
Process command line arguments and invoke bot.
To view, visit change 611679. To unsubscribe, or for help writing mail filters, visit settings.