jenkins-bot has submitted this change and it was merged.

Change subject: pep8-ified pywikibot/titletranslate.py
......................................................................


pep8-ified pywikibot/titletranslate.py

Change-Id: I5c800a0d33948a27dc523c1f2377e1ad63e160bd
---
M pywikibot/titletranslate.py
1 file changed, 15 insertions(+), 12 deletions(-)

Approvals:
  Ladsgroup: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/titletranslate.py b/pywikibot/titletranslate.py
index 5367e92..24ed10f 100644
--- a/pywikibot/titletranslate.py
+++ b/pywikibot/titletranslate.py
@@ -13,6 +13,7 @@
 import pywikibot
 import pywikibot.date as date
 
+
 def translate(page, hints=None, auto=True, removebrackets=False, site=None, 
family=None):
     """
     Goes through all entries in 'hints'. Returns a list of pages.
@@ -45,7 +46,7 @@
                 # be a page in language xy with the same title as the page
                 # we're currently working on ...
                 if page is None:
-                   continue
+                    continue
                 ns = page.namespace()
                 if ns:
                     newname = u'%s:%s' % (family.namespace('_default', ns),
@@ -95,13 +96,13 @@
                     % (page.title(), dictName, value))
                 for entryLang, entry in date.formats[dictName].iteritems():
                     if entryLang != page.site.code:
-                        if dictName == 'yearsBC' and \
-                           entryLang in date.maxyearBC and \
-                           value > date.maxyearBC[entryLang]:
+                        if (dictName == 'yearsBC' and
+                                entryLang in date.maxyearBC and
+                                value > date.maxyearBC[entryLang]):
                             pass
-                        elif dictName == 'yearsAD' and \
-                             entryLang in date.maxyearAD and \
-                             value > date.maxyearAD[entryLang]:
+                        elif (dictName == 'yearsAD' and
+                              entryLang in date.maxyearAD and
+                              value > date.maxyearAD[entryLang]):
                             pass
             else:
                             newname = entry(value)
@@ -110,14 +111,16 @@
                                 pywikibot.getSite(code=entryLang,
                                                   fam=site.family))
                             if x not in result:
-                                result.append(x) # add new page
+                                result.append(x)  # add new page
     return result
 
 bcDateErrors = [u'[[ko:%d년]]']
 
-def appendFormatedDates( result, dictName, value ):
+
+def appendFormatedDates(result, dictName, value):
     for code, func in date.formats[dictName].iteritems():
-        result.append( u'[[%s:%s]]' % (code,func(value)) )
+        result.append(u'[[%s:%s]]' % (code, func(value)))
+
 
 def getPoisonedLinks(pl):
     """Returns a list of known corrupted links that should be removed if seen
@@ -127,11 +130,11 @@
     pywikibot.output(u'getting poisoned links for %s' % pl.title())
     dictName, value = date.getAutoFormat(pl.site.code, pl.title())
     if dictName is not None:
-        pywikibot.output( u'date found in %s' % dictName )
+        pywikibot.output(u'date found in %s' % dictName)
         # errors in year BC
         if dictName in date.bcFormats:
             for fmt in bcDateErrors:
-                result.append( fmt % value )
+                result.append(fmt % value)
         # i guess this is like friday the 13th for the years
         if value == 398 and dictName == 'yearsBC':
             appendFormatedDates(result, dictName, 399)

-- 
To view, visit https://gerrit.wikimedia.org/r/80775
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c800a0d33948a27dc523c1f2377e1ad63e160bd
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to