jenkins-bot has submitted this change and it was merged.
Change subject: [BUGFIX] code improvements + pep8 changes ......................................................................
[BUGFIX] code improvements + pep8 changes
- fix for catTitle in CategoryTidyRobot.run() - remove obsolete site in CategoryMoveRobot constructor - remove obsolete restore variable in main() - PEP8 changes E501
Change-Id: Ide3d7de833b4cebb200261d25902d6592d38083c --- M scripts/category.py 1 file changed, 6 insertions(+), 5 deletions(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/category.py b/scripts/category.py index e5ede3d..a72d33a 100755 --- a/scripts/category.py +++ b/scripts/category.py @@ -392,7 +392,6 @@ editSummary='', inPlace=False, moveCatPage=True, deleteEmptySourceCat=True, titleRegex=None, useSummaryForDeletion=True): - site = pywikibot.getSite() self.editSummary = editSummary self.oldCat = pywikibot.Category( pywikibot.Link('Category:' + oldCatTitle)) @@ -694,7 +693,8 @@ pywikibot.output(' j - Jump to another category') pywikibot.output(' s - Skip this article') pywikibot.output(' r - Remove this category tag') - pywikibot.output(' ? - Print first part of the page (longer and longer)') + pywikibot.output( + ' ? - Print first part of the page (longer and longer)') pywikibot.output(u'Enter - Save category as %s' % current_cat.title())
flag = False @@ -714,7 +714,8 @@ elif choice in ['j', 'J']: newCatTitle = pywikibot.input(u'Please enter the category the ' u'article should be moved to:') - newCat = catlib.Category(pywikibot.Link('Category:' + newCatTitle)) + newCat = catlib.Category(pywikibot.Link('Category:' + + newCatTitle)) # recurse into chosen category self.move_to_category(article, original_cat, newCat) flag = True @@ -758,7 +759,8 @@
articles = set(cat.articles()) if len(articles) == 0: - pywikibot.output(u'There are no articles in category ' + catTitle) + pywikibot.output(u'There are no articles in category ' + + self.catTitle) else: preloadingGen = pagegenerators.PreloadingGenerator(iter(articles)) for article in preloadingGen: @@ -885,7 +887,6 @@ catDB = CategoryDatabase() action = None sort_by_last_name = False - restore = False create_pages = False follow_redirects = False deleteEmptySourceCat = True
pywikibot-commits@lists.wikimedia.org