jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/375820 )
Change subject: [IMPR] Remove trivial "if True:" clause ......................................................................
[IMPR] Remove trivial "if True:" clause
Change-Id: I7a773c34124fe57926a18ae7d3556d1052383db7 --- M pywikibot/titletranslate.py 1 file changed, 13 insertions(+), 15 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/titletranslate.py b/pywikibot/titletranslate.py index 64d617b..16bbb5e 100644 --- a/pywikibot/titletranslate.py +++ b/pywikibot/titletranslate.py @@ -92,19 +92,17 @@ sitelang = page.site.code dictName, value = date.getAutoFormat(sitelang, page.title()) if dictName: - if True: - pywikibot.output( - u'TitleTranslate: %s was recognized as %s with value %d' - % (page.title(), dictName, value)) - for entryLang, entry in date.formats[dictName].items(): - if entryLang not in site.languages(): - continue - if entryLang != sitelang: - if True: - newname = entry(value) - x = pywikibot.Link( - newname, - pywikibot.Site(code=entryLang, - fam=site.family)) - result.add(x) + pywikibot.output( + u'TitleTranslate: %s was recognized as %s with value %d' + % (page.title(), dictName, value)) + for entryLang, entry in date.formats[dictName].items(): + if entryLang not in site.languages(): + continue + if entryLang != sitelang: + newname = entry(value) + x = pywikibot.Link( + newname, + pywikibot.Site(code=entryLang, + fam=site.family)) + result.add(x) return list(result)
pywikibot-commits@lists.wikimedia.org