John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/141370
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(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/70/141370/1 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'', -- To view, visit https://gerrit.wikimedia.org/r/141370 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I767c00ea8b500dc955c1f80b626a076c1c330510 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg <jay...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits