jenkins-bot has submitted this change and it was merged.
Change subject: pep8-ify generate_user_files ......................................................................
pep8-ify generate_user_files
Change-Id: I892c22d0463049d8b0f2e5c5b239b8f79efb13d9 --- M generate_user_files.py 1 file changed, 7 insertions(+), 7 deletions(-)
Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified
diff --git a/generate_user_files.py b/generate_user_files.py index 5beff0d..94ea4ec 100644 --- a/generate_user_files.py +++ b/generate_user_files.py @@ -86,7 +86,7 @@ if choice == '' and default: return default try: - choice=int(choice) + choice = int(choice) except ValueError: pass if isinstance(choice, basestring): @@ -165,16 +165,16 @@ "just enter the number not name", default='wikipedia') if fam not in single_wiki_families: - codesds=codecs.open("pywikibot/families/%s_family.py" % fam, "r","utf-8").read() - rre=re.compile("self.languages_by_size *= *(.+?)]",re.DOTALL) - known_langs=[] + codesds = codecs.open("pywikibot/families/%s_family.py" % fam, "r", "utf-8").read() + rre = re.compile("self.languages_by_size *= *(.+?)]", re.DOTALL) + known_langs = [] if not rre.findall(codesds): - rre=re.compile("self.langs *= *(.+?)}",re.DOTALL) + rre = re.compile("self.langs *= *(.+?)}", re.DOTALL) if rre.findall(codesds): import ast - known_langs=ast.literal_eval(rre.findall(codesds)[0]+u"}").keys() + known_langs = ast.literal_eval(rre.findall(codesds)[0] + u"}").keys() else: - known_langs=eval(rre.findall(codesds)[0]+u"]") + known_langs = eval(rre.findall(codesds)[0] + u"]") print "This is the list of known language(s):" print " ".join(sorted(known_langs)) mylang = raw_input("The language code of the site we're working on (default: 'en'): ") or 'en'
pywikibot-commits@lists.wikimedia.org