jenkins-bot has submitted this change and it was merged.
Change subject: Unused parameters ......................................................................
Unused parameters
Note they are unused with NotImplemented when they might be part of a public API, and instruct pylint to ignore them.
Also a classmethod in commonscat was using 'self' instead of 'cls'. Change-Id: I57f2162e70e3b28c07bdbf1a947566ccb6f075cf --- M scripts/archivebot.py M scripts/commonscat.py M scripts/featured.py M scripts/replace.py M scripts/script_wui.py 5 files changed, 10 insertions(+), 9 deletions(-)
Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/archivebot.py b/scripts/archivebot.py index 2342d55..e0e607e 100644 --- a/scripts/archivebot.py +++ b/scripts/archivebot.py @@ -210,13 +210,13 @@
"""Class building a UTC tzinfo object."""
- def utcoffset(self, dt): + def utcoffset(self, dt): # pylint: disable=unused-argument return ZERO
- def tzname(self, dt): + def tzname(self, dt): # pylint: disable=unused-argument return 'UTC'
- def dst(self, dt): + def dst(self, dt): # pylint: disable=unused-argument return ZERO
def __repr__(self): diff --git a/scripts/commonscat.py b/scripts/commonscat.py index a4bab84..3dee15c 100755 --- a/scripts/commonscat.py +++ b/scripts/commonscat.py @@ -270,7 +270,7 @@ self.addCommonscat(page)
@classmethod - def getCommonscatTemplate(self, code=None): + def getCommonscatTemplate(cls, code=None): """Get the template name of a site. Expects the site code.
Return as tuple containing the primary template and its alternatives. @@ -360,7 +360,7 @@
def changeCommonscat(self, page=None, oldtemplate=u'', oldcat=u'', newtemplate=u'', newcat=u'', linktitle=u'', - description=u''): + description=NotImplemented): # pylint: disable=unused-argument """ Change the current commonscat template and target. """ if oldcat == '3=S' or linktitle == '3=S': return # TODO: handle additional param on de-wiki diff --git a/scripts/featured.py b/scripts/featured.py index d2c2dab..522bae4 100644 --- a/scripts/featured.py +++ b/scripts/featured.py @@ -86,7 +86,7 @@ yield article
-def BACK(site, name, hide): +def BACK(site, name, hide): # pylint: disable=unused-argument p = pywikibot.Page(site, name, ns=10) return [page for page in p.getReferences(follow_redirects=False, onlyTemplateInclusion=True)] @@ -109,7 +109,7 @@
# not implemented yet -def TMPL(site, name, hide): +def TMPL(site, name, hide): # pylint: disable=unused-argument return
diff --git a/scripts/replace.py b/scripts/replace.py index 7c6809f..b5e1a2a 100755 --- a/scripts/replace.py +++ b/scripts/replace.py @@ -493,8 +493,9 @@ def doReplacements(self, original_text): return self.apply_replacements(original_text, set())
- def count_changes(self, page, err): + def count_changes(self, page, err): # pylint: disable=unused-argument """Count succesfully changed pages.""" + # This is an async put callback if not isinstance(err, Exception): self.changed_pages += 1
diff --git a/scripts/script_wui.py b/scripts/script_wui.py index a2dd6b4..65d7148 100755 --- a/scripts/script_wui.py +++ b/scripts/script_wui.py @@ -209,7 +209,7 @@
# Define a function for the thread -def main_script(page, rev=None, params=None): +def main_script(page, rev=None, params=NotImplemented): # pylint: disable=unused-argument """Main thread.""" # http://opensourcehacker.com/2011/02/23/temporarily-capturing-python-logging-... # https://docs.python.org/release/2.6/library/logging.html
pywikibot-commits@lists.wikimedia.org