jenkins-bot merged this change.
[cleanup] Move the initializer on top of the class
Change-Id: If60f27f06d3311e6830cfbb2a3b12d2631022c08
---
M scripts/unlink.py
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/scripts/unlink.py b/scripts/unlink.py
index 00fcaf6..4597d08 100755
--- a/scripts/unlink.py
+++ b/scripts/unlink.py
@@ -21,7 +21,7 @@
descriptions.
"""
#
-# (C) Pywikibot team, 2007-2018
+# (C) Pywikibot team, 2007-2019
#
# Distributed under the terms of the MIT license.
#
@@ -38,11 +38,6 @@
summary_key = 'unlink-unlinking'
- @property
- def summary_parameters(self):
- """Return the title parameter."""
- return {'title': self.pageToUnlink.title()}
-
def __init__(self, pageToUnlink, **kwargs):
"""Initialize a UnlinkBot instance with the given page to unlink."""
super(UnlinkBot, self).__init__(**kwargs)
@@ -50,6 +45,11 @@
self.generator = pageToUnlink.getReferences(
namespaces=self.getOption('namespaces'), content=True)
+ @property
+ def summary_parameters(self):
+ """Return the title parameter."""
+ return {'title': self.pageToUnlink.title()}
+
def treat_page(self):
"""Remove links pointing to the configured page from the given page."""
self.unlink(self.pageToUnlink)
To view, visit change 487648. To unsubscribe, or for help writing mail filters, visit settings.