From 56f9303fce902b50a033231d70f9a67c35dcbbe9 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Wed, 24 Jun 2015 12:12:27 +0100 Subject: [PATCH] PEP-8 fixes. --- .ci/pep8_sources.txt | 1 + cron/parse_builds.py | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.ci/pep8_sources.txt b/.ci/pep8_sources.txt index 41d9b18dad1..0b79e1245a4 100644 --- a/.ci/pep8_sources.txt +++ b/.ci/pep8_sources.txt @@ -1,3 +1,4 @@ +cron/parse_builds.py lib/galaxy/auth lib/galaxy/config.py lib/galaxy/datatypes/data.py diff --git a/cron/parse_builds.py b/cron/parse_builds.py index c188503674b..b62e4a8a33f 100644 --- a/cron/parse_builds.py +++ b/cron/parse_builds.py @@ -15,6 +15,7 @@ try: except IndexError: URL = "http://genome.cse.ucsc.edu/cgi-bin/das/dsn" + def getbuilds(url): try: page = urllib.urlopen(url) @@ -35,21 +36,20 @@ def getbuilds(url): print "?\tunspecified (?)" for dsn in tree: build = dsn.find("SOURCE").attrib['id'] - description = dsn.find("DESCRIPTION").text.replace(" - Genome at UCSC","").replace(" Genome at UCSC","") + description = dsn.find("DESCRIPTION").text.replace(" - Genome at UCSC", "").replace(" Genome at UCSC", "") fields = description.split(" ") temp = fields[0] - for i in range(len(fields)-1): - if temp == fields[i+1]: - fields.pop(i+1) + for i in range(len(fields) - 1): + if temp == fields[i + 1]: + fields.pop(i + 1) else: - temp = fields[i+1] + temp = fields[i + 1] description = " ".join(fields) - yield [build,description] + yield [build, description] if __name__ == "__main__": if len(sys.argv) > 1: URL = sys.argv[1] for build in getbuilds(URL): - print build[0]+"\t"+build[1]+" ("+build[0]+")" - + print build[0] + "\t" + build[1] + " (" + build[0] + ")"