jenkins-bot has submitted this change and it was merged.
Change subject: [lint] remove obsolet urllib import, pep8 changes ......................................................................
[lint] remove obsolet urllib import, pep8 changes
Change-Id: I68d430e9ecaa6eee0bdd970f2c3a0c9dcb0a22f6 --- M pywikibot/family.py 1 file changed, 6 insertions(+), 6 deletions(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/family.py b/pywikibot/family.py index 1688235..d1f2b41 100644 --- a/pywikibot/family.py +++ b/pywikibot/family.py @@ -10,7 +10,6 @@
import logging import re -import urllib import collections
from . import config2 as config @@ -101,7 +100,8 @@ # Order for fy: alphabetical by code, but y counts as i self.fyinterwiki = self.alphabetic[:] self.fyinterwiki.remove('nb') - self.fyinterwiki.sort(key=lambda x: x.replace("y", "i") + x.count("y") * "!") + self.fyinterwiki.sort(key=lambda x: + x.replace("y", "i") + x.count("y") * "!")
self.langs = {}
@@ -857,14 +857,14 @@ % {'language_code': code})
def category_redirects(self, code, fallback="_default"): - if not hasattr(self, "_catredirtemplates") or code not in self._catredirtemplates: + if not hasattr(self, "_catredirtemplates") or \ + code not in self._catredirtemplates: self.get_cr_templates(code, fallback) if code in self._catredirtemplates: return self._catredirtemplates[code] else: - raise KeyError( -"ERROR: title for category redirect template in language '%s' unknown" - % code) + raise KeyError("ERROR: title for category redirect template in " + "language '%s' unknown" % code)
def get_cr_templates(self, code, fallback): if not hasattr(self, "_catredirtemplates"):