jenkins-bot has submitted this change and it was merged.
Change subject: Remove unnecessary tuple return type ......................................................................
Remove unnecessary tuple return type
The tuple return type of addCommonscat() has been unnecessary since 2010. https://www.mediawiki.org/wiki/Special:Code/pywikipedia/8548 Returned (status, always) were unused variables.
Change-Id: I767c00ea8b500dc955c1f80b626a076c1c330510 --- M scripts/commonscat.py 1 file changed, 5 insertions(+), 6 deletions(-)
Approvals: Guoguo12: Looks good to me, but someone else must approve Ladsgroup: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/commonscat.py b/scripts/commonscat.py index e0f1b9a..de28ab2 100755 --- a/scripts/commonscat.py +++ b/scripts/commonscat.py @@ -262,8 +262,7 @@ pywikibot.output(u'Page %s is a disambiguation. Skipping.' % page.title(asLink=True)) else: - (status, always) = self.addCommonscat(page) - return + self.addCommonscat(page)
def load(self, page): """ Load the given page, do some changes, and save it. """ @@ -369,14 +368,14 @@ # The current commonscat link is good pywikibot.output(u'Commonscat link at %s to Category:%s is ok' % (page.title(), currentCommonscatTarget)) - return (True, self.always) + return True elif checkedCommonscatTarget != u'': # We have a new Commonscat link, replace the old one self.changeCommonscat(page, currentCommonscatTemplate, currentCommonscatTarget, primaryCommonscat, checkedCommonscatTarget, LinkText, Note) - return (True, self.always) + return True else: #Commonscat link is wrong commonscatLink = self.findCommonscatLink(page) @@ -403,8 +402,8 @@ self.summary, None, None, self.always) - return (True, self.always) - return (True, self.always) + return True + return True
def changeCommonscat(self, page=None, oldtemplate=u'', oldcat=u'', newtemplate=u'', newcat=u'', linktitle=u'',
pywikibot-commits@lists.wikimedia.org