jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/348210 )
Change subject: [IMPR] rename deprecated argument "comment" ......................................................................
[IMPR] rename deprecated argument "comment"
- "comment" argument was renamed to "summary" in change_category. The old argument keyword is deprecated now. - rename the arguments in category.py and category_redirect.py - makecat will be done by a separate patch
Change-Id: Ib48de38a4f87e223074f7a33e494832ac4246316 --- M scripts/category.py M scripts/category_redirect.py 2 files changed, 7 insertions(+), 7 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/category.py b/scripts/category.py index ffdd13c..978d77a 100755 --- a/scripts/category.py +++ b/scripts/category.py @@ -611,7 +611,7 @@ page.title()):
page.change_category(self.oldcat, self.newcat, - comment=self.comment, + summary=self.comment, inPlace=self.inplace, sortKey=self.keep_sortkey)
@@ -631,7 +631,7 @@ (not self.title_regex or re.search(self.title_regex, doc_page.title()))): doc_page.change_category(self.oldcat, self.newcat, - comment=self.comment, + summary=self.comment, inPlace=self.inplace, include=['includeonly'], sortKey=self.keep_sortkey) @@ -958,7 +958,7 @@ pywikibot.output('No changes necessary.') else: article.change_category(original_cat, current_cat, - comment=self.editSummary) + summary=self.editSummary) elif choice == 'j': newCatTitle = pywikibot.input(u'Please enter the category the ' u'article should be moved to:', @@ -970,7 +970,7 @@ elif choice == 'r': # remove the category tag article.change_category(original_cat, None, - comment=self.editSummary) + summary=self.editSummary) elif choice != 's': if choice[0] == 'u': # recurse into supercategory diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py index 65aae8d..c559b52 100755 --- a/scripts/category_redirect.py +++ b/scripts/category_redirect.py @@ -135,13 +135,13 @@ 'newCatLink': newCat.title(), 'newCatTitle': newCatTitle, } - comment = editSummary % param + summary = editSummary % param # Move articles found, moved = 0, 0 for article in oldCat.members(): found += 1 changed = article.change_category(oldCat, newCat, - comment=comment) + summary=summary) if changed: moved += 1
@@ -157,7 +157,7 @@ except pywikibot.Error: continue changed = doc.change_category(oldCat, newCat, - comment=comment) + summary=summary) if changed: moved += 1
pywikibot-commits@lists.wikimedia.org