jenkins-bot has submitted this change and it was merged.
Change subject: pep8-ified scripts/featured.py ......................................................................
pep8-ified scripts/featured.py
Change-Id: If0956edfb28491f70906c1c4c74dbb105a043c3e --- M scripts/featured.py 1 file changed, 9 insertions(+), 11 deletions(-)
Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/featured.py b/scripts/featured.py index 9c98870..0c3ed50 100644 --- a/scripts/featured.py +++ b/scripts/featured.py @@ -90,6 +90,7 @@ return [page for page in p.getReferences(follow_redirects=False, onlyTemplateInclusion=True)]
+ def DATA(site, name, hide): dp = pywikibot.ItemPage(site.data_repository(), name) try: @@ -266,7 +267,7 @@ if not self.getOption('nocache') is True: pywikibot.output(u'Writing %d items to cache file %s.' % (len(self.cache), self.filename)) - f = open(self.filename,"wb") + f = open(self.filename, "wb") pickle.dump(self.cache, f) f.close() self.cache = dict() @@ -299,10 +300,10 @@ dp.get()
### Quick and dirty hack - any ideas? - self.fromlang = [key.replace('wiki', '').replace('_', '-') - for key in dp.sitelinks.keys()] + self.fromlang = [key.replace('wiki', '').replace('_', '-') + for key in dp.sitelinks.keys()] else: - return ### 2DO + return # 2DO self.fromlang.sort() self.readcache(task) for code in self.fromlang: @@ -334,10 +335,10 @@ dp.get()
### Quick and dirty hack - any ideas? - self.fromlang = [key.replace('wiki', '').replace('_', '-') - for key in dp.sitelinks.keys()] + self.fromlang = [key.replace('wiki', '').replace('_', '-') + for key in dp.sitelinks.keys()] else: - return ### 2DO + return # 2DO self.fromlang.sort() self.readcache(task) for code in self.fromlang: @@ -403,7 +404,6 @@ cache[p.title()])) continue yield copy(p) -
def findTranslated(self, page, oursite=None): quiet = self.getOption('quiet') @@ -473,7 +473,6 @@ pywikibot.output(u"%s -> back interwiki ref target is %s" % (page.title(), backpage.title()))
- def getTemplateList(self, lang, task): add_templates = [] remove_templates = [] @@ -522,7 +521,7 @@ return re.compile(ur"{{%s|%s}}" % (findtemplate.replace(u' ', u'[ _]'), site.code), re.IGNORECASE) - + quiet = self.getOption('quiet') tosite = self.site if not fromsite.lang in self.cache: @@ -601,7 +600,6 @@ % atrans.title()) except pywikibot.PageNotSaved, e: pywikibot.output(u"Page not saved") -
def main(*args):
pywikibot-commits@lists.wikimedia.org