diff --git a/build/tools/repopick.py b/build/tools/repopick.py
index 9321a8e..50ffe37 100755
--- a/build/tools/repopick.py
+++ b/build/tools/repopick.py
@@ -75,7 +75,6 @@
     else:
         raise Exception('Malformed URI: Expecting ssh://[user@]host[:port]')
 
-
     out = subprocess.check_output(['ssh', '-x', '-p{0}'.format(port), userhost, 'gerrit', 'query', '--format=JSON --patch-sets --current-patch-set', query])
     if not hasattr(out, 'encode'):
         out = out.decode()
@@ -98,7 +97,7 @@
                         }
                     },
                     'commit': {
-                        'parents': [{ 'commit': parent } for parent in patch_set['parents']]
+                        'parents': [{'commit': parent} for parent in patch_set['parents']]
                     },
                 } for patch_set in data['patchSets']},
                 'subject': data['subject'],
@@ -121,12 +120,12 @@
                 parts = line.rstrip().split("|")
                 if parts[0] in remote_url:
                     auth = requests.auth.HTTPBasicAuth(username=parts[1], password=parts[2])
-        statusCode = '-1'
+        status_code = '-1'
         if auth:
             url = '{0}/a/changes/?q={1}&o=CURRENT_REVISION&o=ALL_REVISIONS&o=ALL_COMMITS'.format(remote_url, query)
             data = requests.get(url, auth=auth)
-            statusCode = str(data.status_code)
-        if statusCode != '200':
+            status_code = str(data.status_code)
+        if status_code != '200':
             #They didn't get good authorization or data, Let's try the old way
             url = '{0}/changes/?q={1}&o=CURRENT_REVISION&o=ALL_REVISIONS&o=ALL_COMMITS'.format(remote_url, query)
             data = requests.get(url)
@@ -152,6 +151,7 @@
     else:
         raise Exception('Gerrit URL should be in the form http[s]://hostname/ or ssh://[user@]host[:port]')
 
+
 if __name__ == '__main__':
     # Default to LineageOS Gerrit
     default_gerrit = 'https://review.lineageos.org'
@@ -255,8 +255,8 @@
     remotes = xml_root.findall('remote')
     default_revision = xml_root.findall('default')[0].get('revision')
 
-    #dump project data into the a list of dicts with the following data:
-    #{project: {path, revision}}
+    # dump project data into the a list of dicts with the following data:
+    # {project: {path, revision}}
 
     for project in projects:
         name = project.get('name')
@@ -270,7 +270,7 @@
             if revision is None:
                 revision = default_revision
 
-        if not name in project_name_to_data:
+        if name not in project_name_to_data:
             project_name_to_data[name] = {}
         revision = revision.split('refs/heads/')[-1]
         project_name_to_data[name][revision] = path
@@ -409,7 +409,7 @@
             output = output.split()
             if 'Change-Id:' in output:
                 head_change_id = ''
-                for j,t in enumerate(reversed(output)):
+                for j, t in enumerate(reversed(output)):
                     if t == 'Change-Id:':
                         head_change_id = output[len(output) - j]
                         break
