GitHub PullRequestReviewCommentEvent at 2014-08-08 16:15:37
Repository: dxr
Actor: erikrose
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/dxr/pulls/comments/16001502","id":16001502,"diff_hunk":"@@ -45,60 +48,106 @@ def annotations(_):\n \n def pluck2(key1, key2, mappings):\n     \"\"\"Plucks a pair of keys from mappings.\n-    This is a generalization of funcy's pluck function.\n \n+    This is a generalization of funcy's pluck function.\n     (k1, k2, {k: v}) -> [(v1, v2)]\n+\n     \"\"\"\n     return imap(itemgetter(key1, key2), mappings)\n \n \n-def group_sparse_needles(needles):\n+def group_sparse_needles(needles_):\n     \"\"\"Return a pair of iterators (file_needles, line_needles).\"\"\"\n-    needles_ = group_by(lambda x: 'file' if x[1] is None else 'line', needles)\n+    needles_ = group_by(lambda x: 'file' if x[1] is None else 'line', needles_)\n     return needles_['file'], needles_['line']\n \n \n-def get_needle(condensed, tag, key1, key2, field=None, prefix=''):\n-    if field is None:\n-        field = tag\n-\n-    prefix = '{0}-'.format(prefix) if prefix else ''\n-\n-    return ((prefix + tag, key1, key2) for key1, key2\n-            in pluck2(key1, key2, condensed[field]))\n-\n-\n def name_needles(condensed, key):\n+    \"\"\"Return a list of needles ((c-key, name), span).\n+\n+    :param key: name of entry in condensed to get names from.\n+    \"\"\"\n     return izip((('c-{0}'.format(key.replace('_', '-')), props['name'])\n-                for props in condensed[key]), spans(condensed, key))\n+                 for props in condensed[key]), spans(condensed, key))\n \n \n def spans(condensed, key):\n+    \"\"\"Return all list of spans from condensed.\n+\n+    :arg key: name of entry in condensed to get spans from.\n+    \"\"\"\n     return imap(itemgetter('span'), condensed[key])\n \n \n def warn_needles(condensed):\n+    \"\"\"Return list of needles (('c-warning', msg), span).\"\"\"\n     return izip((('c-warning', props['msg']) for props\n                  in condensed['warning']), spans(condensed, 'warning'))\n \n \n def warn_op_needles(condensed):\n+    \"\"\"Return list of needles (('c-warning-opt', opt), span).\"\"\"\n     return izip((('c-warning-opt', props['opt']) for props\n                  in condensed['warning']), spans(condensed, 'warning'))\n \n \n-def callee_needles(condensed):\n+def callee_needles(graph):\n+    \"\"\"Return list of needles (('c-callee', callee name), span).\"\"\"\n     return ((('c-callee', call.callee[0]), call.callee[1]) for call\n-            in condensed['call'])\n+            in graph)\n \n \n-def caller_needles(condensed):\n+def caller_needles(graph):\n+    \"\"\"Return list of needles (('c-needle', caller name), span).\"\"\"\n     return ((('c-called-by', call.caller[0]), call.caller[1]) for call\n-            in condensed['call'])\n+            in graph)\n+\n+\n+def _inherit_needles(condensed, tag, func):","path":"dxr/plugins/clang/__init__.py","position":125,"original_position":125,"commit_id":"55bd750c8b28387cd0872b1909f4721eee5feda9","original_commit_id":"55bd750c8b28387cd0872b1909f4721eee5feda9","user":{"login":"erikrose","id":295816,"avatar_url":"https://avatars.githubusercontent.com/u/295816?v=2","gravatar_id":"a2e2fa7edec98420c8b87f64b7b80e54","url":"https://api.github.com/users/erikrose","html_url":"https://github.com/erikrose","followers_url":"https://api.github.com/users/erikrose/followers","following_url":"https://api.github.com/users/erikrose/following{/other_user}","gists_url":"https://api.github.com/users/erikrose/gists{/gist_id}","starred_url":"https://api.github.com/users/erikrose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikrose/subscriptions","organizations_url":"https://api.github.com/users/erikrose/orgs","repos_url":"https://api.github.com/users/erikrose/repos","events_url":"https://api.github.com/users/erikrose/events{/privacy}","received_events_url":"https://api.github.com/users/erikrose/received_events","type":"User","site_admin":false},"body":"What makes this function more private that the other top-level ones?","created_at":"2014-08-08T16:15:37Z","updated_at":"2014-08-08T16:15:37Z","html_url":"https://github.com/mozilla/dxr/pull/300#discussion_r16001502","pull_request_url":"https://api.github.com/repos/mozilla/dxr/pulls/300","_links":{"self":{"href":"https://api.github.com/repos/mozilla/dxr/pulls/comments/16001502"},"html":{"href":"https://github.com/mozilla/dxr/pull/300#discussion_r16001502"},"pull_request":{"href":"https://api.github.com/repos/mozilla/dxr/pulls/300"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/dxr/pulls/300","id":19226350,"html_url":"https://github.com/mozilla/dxr/pull/300","diff_url":"https://github.com/mozilla/dxr/pull/300.diff","patch_url":"https://github.com/mozilla/dxr/pull/300.patch","issue_url":"https://api.github.com/repos/mozilla/dxr/issues/300","number":300,"state":"open","title":"Inheritance needles","user":{"login":"mvcisback","id":388723,"avatar_url":"https://avatars.githubusercontent.com/u/388723?v=2","gravatar_id":"9b0e5ce436242f4c85a5595c62c24a1f","url":"https://api.github.com/users/mvcisback","html_url":"https://github.com/mvcisback","followers_url":"https://api.github.com/users/mvcisback/followers","following_url":"https://api.github.com/users/mvcisback/following{/other_user}","gists_url":"https://api.github.com/users/mvcisback/gists{/gist_id}","starred_url":"https://api.github.com/users/mvcisback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvcisback/subscriptions","organizations_url":"https://api.github.com/users/mvcisback/orgs","repos_url":"https://api.github.com/users/mvcisback/repos","events_url":"https://api.github.com/users/mvcisback/events{/privacy}","received_events_url":"https://api.github.com/users/mvcisback/received_events","type":"User","site_admin":false},"body":"Implements Base and Derived needles (but under the names child and parent... )\r\n\r\nDepends on #295","created_at":"2014-08-01T18:35:10Z","updated_at":"2014-08-08T16:15:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40ddb06146b3b8352bc964c0af8680c6ea1ff1f7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/dxr/pulls/300/commits","review_comments_url":"https://api.github.com/repos/mozilla/dxr/pulls/300/comments","review_comment_url":"https://api.github.com/repos/mozilla/dxr/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/dxr/issues/300/comments","statuses_url":"https://api.github.com/repos/mozilla/dxr/statuses/55bd750c8b28387cd0872b1909f4721eee5feda9","head":{"label":"mvcisback:inheritance_needles","ref":"inheritance_needles","sha":"55bd750c8b28387cd0872b1909f4721eee5feda9","user":{"login":"mvcisback","id":388723,"avatar_url":"https://avatars.githubusercontent.com/u/388723?v=2","gravatar_id":"9b0e5ce436242f4c85a5595c62c24a1f","url":"https://api.github.com/users/mvcisback","html_url":"https://github.com/mvcisback","followers_url":"https://api.github.com/users/mvcisback/followers","following_url":"https://api.github.com/users/mvcisback/following{/other_user}","gists_url":"https://api.github.com/users/mvcisback/gists{/gist_id}","starred_url":"https://api.github.com/users/mvcisback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvcisback/subscriptions","organizations_url":"https://api.github.com/users/mvcisback/orgs","repos_url":"https://api.github.com/users/mvcisback/repos","events_url":"https://api.github.com/users/mvcisback/events{/privacy}","received_events_url":"https://api.github.com/users/mvcisback/received_events","type":"User","site_admin":false},"repo":{"id":18114437,"name":"dxr","full_name":"mvcisback/dxr","owner":{"login":"mvcisback","id":388723,"avatar_url":"https://avatars.githubusercontent.com/u/388723?v=2","gravatar_id":"9b0e5ce436242f4c85a5595c62c24a1f","url":"https://api.github.com/users/mvcisback","html_url":"https://github.com/mvcisback","followers_url":"https://api.github.com/users/mvcisback/followers","following_url":"https://api.github.com/users/mvcisback/following{/other_user}","gists_url":"https://api.github.com/users/mvcisback/gists{/gist_id}","starred_url":"https://api.github.com/users/mvcisback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvcisback/subscriptions","organizations_url":"https://api.github.com/users/mvcisback/orgs","repos_url":"https://api.github.com/users/mvcisback/repos","events_url":"https://api.github.com/users/mvcisback/events{/privacy}","received_events_url":"https://api.github.com/users/mvcisback/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mvcisback/dxr","description":"An intelligent source code browser","fork":true,"url":"https://api.github.com/repos/mvcisback/dxr","forks_url":"https://api.github.com/repos/mvcisback/dxr/forks","keys_url":"https://api.github.com/repos/mvcisback/dxr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mvcisback/dxr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mvcisback/dxr/teams","hooks_url":"https://api.github.com/repos/mvcisback/dxr/hooks","issue_events_url":"https://api.github.com/repos/mvcisback/dxr/issues/events{/number}","events_url":"https://api.github.com/repos/mvcisback/dxr/events","assignees_url":"https://api.github.com/repos/mvcisback/dxr/assignees{/user}","branches_url":"https://api.github.com/repos/mvcisback/dxr/branches{/branch}","tags_url":"https://api.github.com/repos/mvcisback/dxr/tags","blobs_url":"https://api.github.com/repos/mvcisback/dxr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mvcisback/dxr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mvcisback/dxr/git/refs{/sha}","trees_url":"https://api.github.com/repos/mvcisback/dxr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mvcisback/dxr/statuses/{sha}","languages_url":"https://api.github.com/repos/mvcisback/dxr/languages","stargazers_url":"https://api.github.com/repos/mvcisback/dxr/stargazers","contributors_url":"https://api.github.com/repos/mvcisback/dxr/contributors","subscribers_url":"https://api.github.com/repos/mvcisback/dxr/subscribers","subscription_url":"https://api.github.com/repos/mvcisback/dxr/subscription","commits_url":"https://api.github.com/repos/mvcisback/dxr/commits{/sha}","git_commits_url":"https://api.github.com/repos/mvcisback/dxr/git/commits{/sha}","comments_url":"https://api.github.com/repos/mvcisback/dxr/comments{/number}","issue_comment_url":"https://api.github.com/repos/mvcisback/dxr/issues/comments/{number}","contents_url":"https://api.github.com/repos/mvcisback/dxr/contents/{+path}","compare_url":"https://api.github.com/repos/mvcisback/dxr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mvcisback/dxr/merges","archive_url":"https://api.github.com/repos/mvcisback/dxr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mvcisback/dxr/downloads","issues_url":"https://api.github.com/repos/mvcisback/dxr/issues{/number}","pulls_url":"https://api.github.com/repos/mvcisback/dxr/pulls{/number}","milestones_url":"https://api.github.com/repos/mvcisback/dxr/milestones{/number}","notifications_url":"https://api.github.com/repos/mvcisback/dxr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mvcisback/dxr/labels{/name}","releases_url":"https://api.github.com/repos/mvcisback/dxr/releases{/id}","created_at":"2014-03-25T19:55:14Z","updated_at":"2014-06-06T18:21:56Z","pushed_at":"2014-08-08T05:02:09Z","git_url":"git://github.com/mvcisback/dxr.git","ssh_url":"git@github.com:mvcisback/dxr.git","clone_url":"https://github.com/mvcisback/dxr.git","svn_url":"https://github.com/mvcisback/dxr","homepage":"","size":9951,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:es","ref":"es","sha":"4ac6aa6fe5331149dd96f2e75bfd39881803a69e","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=2","gravatar_id":"9ba739c8f3288e256b13553e4d257b5e","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":1795049,"name":"dxr","full_name":"mozilla/dxr","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=2","gravatar_id":"9ba739c8f3288e256b13553e4d257b5e","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/dxr","description":"An intelligent source code browser","fork":false,"url":"https://api.github.com/repos/mozilla/dxr","forks_url":"https://api.github.com/repos/mozilla/dxr/forks","keys_url":"https://api.github.com/repos/mozilla/dxr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/dxr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/dxr/teams","hooks_url":"https://api.github.com/repos/mozilla/dxr/hooks","issue_events_url":"https://api.github.com/repos/mozilla/dxr/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/dxr/events","assignees_url":"https://api.github.com/repos/mozilla/dxr/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/dxr/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/dxr/tags","blobs_url":"https://api.github.com/repos/mozilla/dxr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/dxr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/dxr/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/dxr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/dxr/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/dxr/languages","stargazers_url":"https://api.github.com/repos/mozilla/dxr/stargazers","contributors_url":"https://api.github.com/repos/mozilla/dxr/contributors","subscribers_url":"https://api.github.com/repos/mozilla/dxr/subscribers","subscription_url":"https://api.github.com/repos/mozilla/dxr/subscription","commits_url":"https://api.github.com/repos/mozilla/dxr/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/dxr/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/dxr/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/dxr/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/dxr/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/dxr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/dxr/merges","archive_url":"https://api.github.com/repos/mozilla/dxr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/dxr/downloads","issues_url":"https://api.github.com/repos/mozilla/dxr/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/dxr/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/dxr/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/dxr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/dxr/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/dxr/releases{/id}","created_at":"2011-05-24T18:52:38Z","updated_at":"2014-08-08T16:15:21Z","pushed_at":"2014-08-06T16:20:21Z","git_url":"git://github.com/mozilla/dxr.git","ssh_url":"git@github.com:mozilla/dxr.git","clone_url":"https://github.com/mozilla/dxr.git","svn_url":"https://github.com/mozilla/dxr","homepage":"https://dxr.readthedocs.org/","size":14172,"stargazers_count":222,"watchers_count":222,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":101,"mirror_url":null,"open_issues_count":25,"forks":101,"open_issues":25,"watchers":222,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/dxr/pulls/300"},"html":{"href":"https://github.com/mozilla/dxr/pull/300"},"issue":{"href":"https://api.github.com/repos/mozilla/dxr/issues/300"},"comments":{"href":"https://api.github.com/repos/mozilla/dxr/issues/300/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/dxr/pulls/300/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/dxr/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/dxr/pulls/300/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/dxr/statuses/55bd750c8b28387cd0872b1909f4721eee5feda9"}}}}