{"action":"created","comment":{"url":"https://api.github.com/repos/customelements/v2/pulls/comments/71826849","id":71826849,"diff_hunk":"@@ -90,83 +92,89 @@ def get(self, owner, repo, ver=None):\n     bower = Content.get_by_id('bower', parent=version.key, read_policy=ndb.EVENTUAL_CONSISTENCY)\n     if bower is not None:\n       try:\n-        bowerJson = json.loads(bower.content)\n+        bower_json = json.loads(bower.content)\n+      # TODO: Which exception is this for?\n+      # pylint: disable=bare-except\n       except:\n-        bowerJson = {}\n+        bower_json = {}\n     readme = Content.get_by_id('readme.html', parent=version.key, read_policy=ndb.EVENTUAL_CONSISTENCY)\n-    fullNameMatch = re.match(r'(.*)/(.*)', metadata['full_name'])\n+    full_name_match = re.match(r'(.*)/(.*)', metadata['full_name'])\n     result = {\n-      'version': ver,\n-      'versions': versions,\n-      'readme': None if readme is None else readme.content,\n-      'subscribers': metadata['subscribers_count'],\n-      'stars': metadata['stargazers_count'],\n-      'forks': metadata['forks'],\n-      'contributors': library.contributor_count,\n-      'open_issues': metadata['open_issues'],\n-      'updated_at': metadata['updated_at'],\n-      'owner': fullNameMatch.groups()[0],\n-      'repo': fullNameMatch.groups()[1],\n-      'bower': None if bower is None else {\n-        'description': bowerJson.get('description', ''),\n-        'license': bowerJson.get('license', ''),\n-        'dependencies': bowerJson.get('dependencies', []),\n-        'keywords': bowerJson.get('keywords', []),\n-      },\n-      'collections': []\n+        'version': ver,\n+        'versions': versions,\n+        'readme': None if readme is None else readme.content,\n+        'subscribers': metadata['subscribers_count'],\n+        'stars': metadata['stargazers_count'],\n+        'forks': metadata['forks'],\n+        'contributors': library.contributor_count,\n+        'open_issues': metadata['open_issues'],\n+        'updated_at': metadata['updated_at'],\n+        'owner': full_name_match.groups()[0],\n+        'repo': full_name_match.groups()[1],\n+        'bower': None if bower is None else {\n+            'description': bower_json.get('description', ''),\n+            'license': bower_json.get('license', ''),\n+            'dependencies': bower_json.get('dependencies', []),\n+            'keywords': bower_json.get('keywords', []),\n+        },\n+        'collections': []\n     }\n     for collection in library.collections:\n-      if not versionTag.match(ver, collection.semver):\n+      if not versiontag.match(ver, collection.semver):\n         continue\n-      collectionVersion = collection.version.id()\n-      collectionLibrary = collection.version.parent().get()\n-      collectionMetadata = json.loads(collectionLibrary.metadata)\n-      collectionNameMatch = re.match(r'(.*)/(.*)', collectionMetadata['full_name'])\n+      collection_version = collection.version.id()\n+      collection_library = collection.version.parent().get()\n+      collection_metadata = json.loads(collection_library.metadata)\n+      collection_name_match = re.match(r'(.*)/(.*)', collection_metadata['full_name'])\n       result['collections'].append({\n-        'owner': collectionNameMatch.groups()[0],\n-        'repo': collectionNameMatch.groups()[1],\n-        'version': collectionVersion\n+          'owner': collection_name_match.groups()[0],\n+          'repo': collection_name_match.groups()[1],\n+          'version': collection_version\n       })\n     if library.kind == 'collection':\n       dependencies = []\n-      versionFutures = []\n+      version_futures = []\n       for dep in version.dependencies:\n-        parsedDep = Dependency.fromString(dep)\n-        depKey = ndb.Key(Library, \"%s/%s\" % (parsedDep.owner.lower(), parsedDep.repo.lower()))\n-        versionFutures.append(Library.versionsForKey_async(depKey))\n+        parsed_dep = Dependency.fromString(dep)\n+        dep_key = ndb.Key(Library, \"%s/%s\" % (parsed_dep.owner.lower(), parsed_dep.repo.lower()))\n+        version_futures.append(Library.versionsForKey_async(dep_key))","path":"src/api.py","position":null,"original_position":174,"commit_id":"2078e1a5b8a116ee67a6502dffd3a83713679fa0","original_commit_id":"f2d2769f5e1b113e0ad478c68dfd7399bad9acb0","user":{"login":"samuelli","id":787668,"avatar_url":"https://avatars.githubusercontent.com/u/787668?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelli","html_url":"https://github.com/samuelli","followers_url":"https://api.github.com/users/samuelli/followers","following_url":"https://api.github.com/users/samuelli/following{/other_user}","gists_url":"https://api.github.com/users/samuelli/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelli/subscriptions","organizations_url":"https://api.github.com/users/samuelli/orgs","repos_url":"https://api.github.com/users/samuelli/repos","events_url":"https://api.github.com/users/samuelli/events{/privacy}","received_events_url":"https://api.github.com/users/samuelli/received_events","type":"User","site_admin":false},"body":"? is this meant to be versions_for_key?","created_at":"2016-07-22T04:54:23Z","updated_at":"2016-07-22T04:54:23Z","html_url":"https://github.com/customelements/v2/pull/25#discussion_r71826849","pull_request_url":"https://api.github.com/repos/customelements/v2/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/customelements/v2/pulls/comments/71826849"},"html":{"href":"https://github.com/customelements/v2/pull/25#discussion_r71826849"},"pull_request":{"href":"https://api.github.com/repos/customelements/v2/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/customelements/v2/pulls/25","id":78424156,"html_url":"https://github.com/customelements/v2/pull/25","diff_url":"https://github.com/customelements/v2/pull/25.diff","patch_url":"https://github.com/customelements/v2/pull/25.patch","issue_url":"https://api.github.com/repos/customelements/v2/issues/25","number":25,"state":"open","locked":false,"title":"Add api module","user":{"login":"dstockwell","id":539597,"avatar_url":"https://avatars.githubusercontent.com/u/539597?v=3","gravatar_id":"","url":"https://api.github.com/users/dstockwell","html_url":"https://github.com/dstockwell","followers_url":"https://api.github.com/users/dstockwell/followers","following_url":"https://api.github.com/users/dstockwell/following{/other_user}","gists_url":"https://api.github.com/users/dstockwell/gists{/gist_id}","starred_url":"https://api.github.com/users/dstockwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstockwell/subscriptions","organizations_url":"https://api.github.com/users/dstockwell/orgs","repos_url":"https://api.github.com/users/dstockwell/repos","events_url":"https://api.github.com/users/dstockwell/events{/privacy}","received_events_url":"https://api.github.com/users/dstockwell/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-22T04:51:22Z","updated_at":"2016-07-22T04:54:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81539f4493166ffc1a2729d10174ab271d0c03ea","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/customelements/v2/pulls/25/commits","review_comments_url":"https://api.github.com/repos/customelements/v2/pulls/25/comments","review_comment_url":"https://api.github.com/repos/customelements/v2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/customelements/v2/issues/25/comments","statuses_url":"https://api.github.com/repos/customelements/v2/statuses/2078e1a5b8a116ee67a6502dffd3a83713679fa0","head":{"label":"dstockwell:add-api","ref":"add-api","sha":"2078e1a5b8a116ee67a6502dffd3a83713679fa0","user":{"login":"dstockwell","id":539597,"avatar_url":"https://avatars.githubusercontent.com/u/539597?v=3","gravatar_id":"","url":"https://api.github.com/users/dstockwell","html_url":"https://github.com/dstockwell","followers_url":"https://api.github.com/users/dstockwell/followers","following_url":"https://api.github.com/users/dstockwell/following{/other_user}","gists_url":"https://api.github.com/users/dstockwell/gists{/gist_id}","starred_url":"https://api.github.com/users/dstockwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstockwell/subscriptions","organizations_url":"https://api.github.com/users/dstockwell/orgs","repos_url":"https://api.github.com/users/dstockwell/repos","events_url":"https://api.github.com/users/dstockwell/events{/privacy}","received_events_url":"https://api.github.com/users/dstockwell/received_events","type":"User","site_admin":false},"repo":{"id":63836549,"name":"v2","full_name":"dstockwell/v2","owner":{"login":"dstockwell","id":539597,"avatar_url":"https://avatars.githubusercontent.com/u/539597?v=3","gravatar_id":"","url":"https://api.github.com/users/dstockwell","html_url":"https://github.com/dstockwell","followers_url":"https://api.github.com/users/dstockwell/followers","following_url":"https://api.github.com/users/dstockwell/following{/other_user}","gists_url":"https://api.github.com/users/dstockwell/gists{/gist_id}","starred_url":"https://api.github.com/users/dstockwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstockwell/subscriptions","organizations_url":"https://api.github.com/users/dstockwell/orgs","repos_url":"https://api.github.com/users/dstockwell/repos","events_url":"https://api.github.com/users/dstockwell/events{/privacy}","received_events_url":"https://api.github.com/users/dstockwell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dstockwell/v2","description":"Next version of custom-elements.io","fork":true,"url":"https://api.github.com/repos/dstockwell/v2","forks_url":"https://api.github.com/repos/dstockwell/v2/forks","keys_url":"https://api.github.com/repos/dstockwell/v2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dstockwell/v2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dstockwell/v2/teams","hooks_url":"https://api.github.com/repos/dstockwell/v2/hooks","issue_events_url":"https://api.github.com/repos/dstockwell/v2/issues/events{/number}","events_url":"https://api.github.com/repos/dstockwell/v2/events","assignees_url":"https://api.github.com/repos/dstockwell/v2/assignees{/user}","branches_url":"https://api.github.com/repos/dstockwell/v2/branches{/branch}","tags_url":"https://api.github.com/repos/dstockwell/v2/tags","blobs_url":"https://api.github.com/repos/dstockwell/v2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dstockwell/v2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dstockwell/v2/git/refs{/sha}","trees_url":"https://api.github.com/repos/dstockwell/v2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dstockwell/v2/statuses/{sha}","languages_url":"https://api.github.com/repos/dstockwell/v2/languages","stargazers_url":"https://api.github.com/repos/dstockwell/v2/stargazers","contributors_url":"https://api.github.com/repos/dstockwell/v2/contributors","subscribers_url":"https://api.github.com/repos/dstockwell/v2/subscribers","subscription_url":"https://api.github.com/repos/dstockwell/v2/subscription","commits_url":"https://api.github.com/repos/dstockwell/v2/commits{/sha}","git_commits_url":"https://api.github.com/repos/dstockwell/v2/git/commits{/sha}","comments_url":"https://api.github.com/repos/dstockwell/v2/comments{/number}","issue_comment_url":"https://api.github.com/repos/dstockwell/v2/issues/comments{/number}","contents_url":"https://api.github.com/repos/dstockwell/v2/contents/{+path}","compare_url":"https://api.github.com/repos/dstockwell/v2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dstockwell/v2/merges","archive_url":"https://api.github.com/repos/dstockwell/v2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dstockwell/v2/downloads","issues_url":"https://api.github.com/repos/dstockwell/v2/issues{/number}","pulls_url":"https://api.github.com/repos/dstockwell/v2/pulls{/number}","milestones_url":"https://api.github.com/repos/dstockwell/v2/milestones{/number}","notifications_url":"https://api.github.com/repos/dstockwell/v2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dstockwell/v2/labels{/name}","releases_url":"https://api.github.com/repos/dstockwell/v2/releases{/id}","deployments_url":"https://api.github.com/repos/dstockwell/v2/deployments","created_at":"2016-07-21T04:19:01Z","updated_at":"2016-07-21T04:19:02Z","pushed_at":"2016-07-22T04:51:08Z","git_url":"git://github.com/dstockwell/v2.git","ssh_url":"git@github.com:dstockwell/v2.git","clone_url":"https://github.com/dstockwell/v2.git","svn_url":"https://github.com/dstockwell/v2","homepage":"http://custom-elements.appspot.com/","size":82,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"customelements:master","ref":"master","sha":"c752a496bfb3aced705c8591b2c564dee41f68d5","user":{"login":"customelements","id":5261796,"avatar_url":"https://avatars.githubusercontent.com/u/5261796?v=3","gravatar_id":"","url":"https://api.github.com/users/customelements","html_url":"https://github.com/customelements","followers_url":"https://api.github.com/users/customelements/followers","following_url":"https://api.github.com/users/customelements/following{/other_user}","gists_url":"https://api.github.com/users/customelements/gists{/gist_id}","starred_url":"https://api.github.com/users/customelements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/customelements/subscriptions","organizations_url":"https://api.github.com/users/customelements/orgs","repos_url":"https://api.github.com/users/customelements/repos","events_url":"https://api.github.com/users/customelements/events{/privacy}","received_events_url":"https://api.github.com/users/customelements/received_events","type":"Organization","site_admin":false},"repo":{"id":62266995,"name":"v2","full_name":"customelements/v2","owner":{"login":"customelements","id":5261796,"avatar_url":"https://avatars.githubusercontent.com/u/5261796?v=3","gravatar_id":"","url":"https://api.github.com/users/customelements","html_url":"https://github.com/customelements","followers_url":"https://api.github.com/users/customelements/followers","following_url":"https://api.github.com/users/customelements/following{/other_user}","gists_url":"https://api.github.com/users/customelements/gists{/gist_id}","starred_url":"https://api.github.com/users/customelements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/customelements/subscriptions","organizations_url":"https://api.github.com/users/customelements/orgs","repos_url":"https://api.github.com/users/customelements/repos","events_url":"https://api.github.com/users/customelements/events{/privacy}","received_events_url":"https://api.github.com/users/customelements/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/customelements/v2","description":"Next version of custom-elements.io","fork":false,"url":"https://api.github.com/repos/customelements/v2","forks_url":"https://api.github.com/repos/customelements/v2/forks","keys_url":"https://api.github.com/repos/customelements/v2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/customelements/v2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/customelements/v2/teams","hooks_url":"https://api.github.com/repos/customelements/v2/hooks","issue_events_url":"https://api.github.com/repos/customelements/v2/issues/events{/number}","events_url":"https://api.github.com/repos/customelements/v2/events","assignees_url":"https://api.github.com/repos/customelements/v2/assignees{/user}","branches_url":"https://api.github.com/repos/customelements/v2/branches{/branch}","tags_url":"https://api.github.com/repos/customelements/v2/tags","blobs_url":"https://api.github.com/repos/customelements/v2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/customelements/v2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/customelements/v2/git/refs{/sha}","trees_url":"https://api.github.com/repos/customelements/v2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/customelements/v2/statuses/{sha}","languages_url":"https://api.github.com/repos/customelements/v2/languages","stargazers_url":"https://api.github.com/repos/customelements/v2/stargazers","contributors_url":"https://api.github.com/repos/customelements/v2/contributors","subscribers_url":"https://api.github.com/repos/customelements/v2/subscribers","subscription_url":"https://api.github.com/repos/customelements/v2/subscription","commits_url":"https://api.github.com/repos/customelements/v2/commits{/sha}","git_commits_url":"https://api.github.com/repos/customelements/v2/git/commits{/sha}","comments_url":"https://api.github.com/repos/customelements/v2/comments{/number}","issue_comment_url":"https://api.github.com/repos/customelements/v2/issues/comments{/number}","contents_url":"https://api.github.com/repos/customelements/v2/contents/{+path}","compare_url":"https://api.github.com/repos/customelements/v2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/customelements/v2/merges","archive_url":"https://api.github.com/repos/customelements/v2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/customelements/v2/downloads","issues_url":"https://api.github.com/repos/customelements/v2/issues{/number}","pulls_url":"https://api.github.com/repos/customelements/v2/pulls{/number}","milestones_url":"https://api.github.com/repos/customelements/v2/milestones{/number}","notifications_url":"https://api.github.com/repos/customelements/v2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/customelements/v2/labels{/name}","releases_url":"https://api.github.com/repos/customelements/v2/releases{/id}","deployments_url":"https://api.github.com/repos/customelements/v2/deployments","created_at":"2016-06-30T00:36:06Z","updated_at":"2016-07-13T03:08:24Z","pushed_at":"2016-07-22T04:51:23Z","git_url":"git://github.com/customelements/v2.git","ssh_url":"git@github.com:customelements/v2.git","clone_url":"https://github.com/customelements/v2.git","svn_url":"https://github.com/customelements/v2","homepage":"http://custom-elements.appspot.com/","size":93,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/customelements/v2/pulls/25"},"html":{"href":"https://github.com/customelements/v2/pull/25"},"issue":{"href":"https://api.github.com/repos/customelements/v2/issues/25"},"comments":{"href":"https://api.github.com/repos/customelements/v2/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/customelements/v2/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/customelements/v2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/customelements/v2/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/customelements/v2/statuses/2078e1a5b8a116ee67a6502dffd3a83713679fa0"}}}}
{"actor":{"display_login":"samuelli"}}