{"action":"created","comment":{"url":"https://api.github.com/repos/pyta-uoft/pyta/pulls/comments/65987505","id":65987505,"diff_hunk":"@@ -0,0 +1,49 @@\n+from astroid.scoped_nodes import FunctionDef\n+from astroid.scoped_nodes import ClassDef\n+from astroid.manager import AstroidManager\n+\n+\n+class DocumentedModule:\n+    '''Encapsulates a module with all the classes and top level functions being","path":"comment_extractor.py","position":7,"original_position":7,"commit_id":"f50780b313a95955f3c4c5d8afd721999014dfcc","original_commit_id":"f50780b313a95955f3c4c5d8afd721999014dfcc","user":{"login":"david-yz-liu","id":3333115,"avatar_url":"https://avatars.githubusercontent.com/u/3333115?v=3","gravatar_id":"","url":"https://api.github.com/users/david-yz-liu","html_url":"https://github.com/david-yz-liu","followers_url":"https://api.github.com/users/david-yz-liu/followers","following_url":"https://api.github.com/users/david-yz-liu/following{/other_user}","gists_url":"https://api.github.com/users/david-yz-liu/gists{/gist_id}","starred_url":"https://api.github.com/users/david-yz-liu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-yz-liu/subscriptions","organizations_url":"https://api.github.com/users/david-yz-liu/orgs","repos_url":"https://api.github.com/users/david-yz-liu/repos","events_url":"https://api.github.com/users/david-yz-liu/events{/privacy}","received_events_url":"https://api.github.com/users/david-yz-liu/received_events","type":"User","site_admin":false},"body":"Please use double-quotes.","created_at":"2016-06-06T23:28:07Z","updated_at":"2016-06-06T23:28:07Z","html_url":"https://github.com/pyta-uoft/pyta/pull/55#discussion_r65987505","pull_request_url":"https://api.github.com/repos/pyta-uoft/pyta/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/pyta-uoft/pyta/pulls/comments/65987505"},"html":{"href":"https://github.com/pyta-uoft/pyta/pull/55#discussion_r65987505"},"pull_request":{"href":"https://api.github.com/repos/pyta-uoft/pyta/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/pyta-uoft/pyta/pulls/55","id":72632858,"html_url":"https://github.com/pyta-uoft/pyta/pull/55","diff_url":"https://github.com/pyta-uoft/pyta/pull/55.diff","patch_url":"https://github.com/pyta-uoft/pyta/pull/55.patch","issue_url":"https://api.github.com/repos/pyta-uoft/pyta/issues/55","number":55,"state":"open","locked":false,"title":"Added comment extractor using astroid","user":{"login":"WChrisK","id":3758824,"avatar_url":"https://avatars.githubusercontent.com/u/3758824?v=3","gravatar_id":"","url":"https://api.github.com/users/WChrisK","html_url":"https://github.com/WChrisK","followers_url":"https://api.github.com/users/WChrisK/followers","following_url":"https://api.github.com/users/WChrisK/following{/other_user}","gists_url":"https://api.github.com/users/WChrisK/gists{/gist_id}","starred_url":"https://api.github.com/users/WChrisK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WChrisK/subscriptions","organizations_url":"https://api.github.com/users/WChrisK/orgs","repos_url":"https://api.github.com/users/WChrisK/repos","events_url":"https://api.github.com/users/WChrisK/events{/privacy}","received_events_url":"https://api.github.com/users/WChrisK/received_events","type":"User","site_admin":false},"body":"Example usage:\r\n\r\n```python\r\n>>> m = DocumentedModule('pyta.py')\r\n```\r\n```python\r\n>>> m.classes\r\n[<__main__.DocumentedClass object at 0x03456170>]\r\n```\r\n```python\r\n>>> m.functions\r\n[<__main__.DocumentedFunction object at 0x03456210>, <__main__.DocumentedFunction object at 0x03456250>]\r\n```\r\n```python\r\n>>> m.classes[0]\r\n<__main__.DocumentedClass object at 0x03456170>\r\n```\r\n```python\r\n>>> m.classes[0].name\r\n'PyTAReporter'\r\n>>> m.classes[0].docstring\r\n''\r\n>>> m.classes[0].methods\r\n[<__main__.DocumentedFunction object at 0x03457AF0>, <__main__.DocumentedFunction object at 0x03457B50>, <__main__.DocumentedFunction object at 0x03C0F790>]\r\n```\r\n```python\r\n>>> for f in m.classes[0].methods:\r\n\tprint(f.name, f.args, f.docstring)\r\n\r\n\t\r\n__init__ ['self'] \r\nhandle_message ['self', 'msg'] Handle a new message triggered on the current file.\r\nprint_message_ids ['self'] \r\n>>> print(m.functions[0].name, m.functions[0].args, m.functions[0].docstring)\r\ncheck ['module_name'] Check a module for errors, printing a report.\r\n\r\n    The name of the module should be passed in as a string,\r\n    without a file extension (.py).\r\n```","created_at":"2016-06-05T15:55:29Z","updated_at":"2016-06-06T23:28:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae9c43d2826b7553a4840ec15b82f962bf36410b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pyta-uoft/pyta/pulls/55/commits","review_comments_url":"https://api.github.com/repos/pyta-uoft/pyta/pulls/55/comments","review_comment_url":"https://api.github.com/repos/pyta-uoft/pyta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pyta-uoft/pyta/issues/55/comments","statuses_url":"https://api.github.com/repos/pyta-uoft/pyta/statuses/f50780b313a95955f3c4c5d8afd721999014dfcc","head":{"label":"WChrisK:comment_astroid","ref":"comment_astroid","sha":"f50780b313a95955f3c4c5d8afd721999014dfcc","user":{"login":"WChrisK","id":3758824,"avatar_url":"https://avatars.githubusercontent.com/u/3758824?v=3","gravatar_id":"","url":"https://api.github.com/users/WChrisK","html_url":"https://github.com/WChrisK","followers_url":"https://api.github.com/users/WChrisK/followers","following_url":"https://api.github.com/users/WChrisK/following{/other_user}","gists_url":"https://api.github.com/users/WChrisK/gists{/gist_id}","starred_url":"https://api.github.com/users/WChrisK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WChrisK/subscriptions","organizations_url":"https://api.github.com/users/WChrisK/orgs","repos_url":"https://api.github.com/users/WChrisK/repos","events_url":"https://api.github.com/users/WChrisK/events{/privacy}","received_events_url":"https://api.github.com/users/WChrisK/received_events","type":"User","site_admin":false},"repo":{"id":57931558,"name":"pyta","full_name":"WChrisK/pyta","owner":{"login":"WChrisK","id":3758824,"avatar_url":"https://avatars.githubusercontent.com/u/3758824?v=3","gravatar_id":"","url":"https://api.github.com/users/WChrisK","html_url":"https://github.com/WChrisK","followers_url":"https://api.github.com/users/WChrisK/followers","following_url":"https://api.github.com/users/WChrisK/following{/other_user}","gists_url":"https://api.github.com/users/WChrisK/gists{/gist_id}","starred_url":"https://api.github.com/users/WChrisK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WChrisK/subscriptions","organizations_url":"https://api.github.com/users/WChrisK/orgs","repos_url":"https://api.github.com/users/WChrisK/repos","events_url":"https://api.github.com/users/WChrisK/events{/privacy}","received_events_url":"https://api.github.com/users/WChrisK/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WChrisK/pyta","description":"Adventures in code analysis for teaching Python.","fork":true,"url":"https://api.github.com/repos/WChrisK/pyta","forks_url":"https://api.github.com/repos/WChrisK/pyta/forks","keys_url":"https://api.github.com/repos/WChrisK/pyta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WChrisK/pyta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WChrisK/pyta/teams","hooks_url":"https://api.github.com/repos/WChrisK/pyta/hooks","issue_events_url":"https://api.github.com/repos/WChrisK/pyta/issues/events{/number}","events_url":"https://api.github.com/repos/WChrisK/pyta/events","assignees_url":"https://api.github.com/repos/WChrisK/pyta/assignees{/user}","branches_url":"https://api.github.com/repos/WChrisK/pyta/branches{/branch}","tags_url":"https://api.github.com/repos/WChrisK/pyta/tags","blobs_url":"https://api.github.com/repos/WChrisK/pyta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WChrisK/pyta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WChrisK/pyta/git/refs{/sha}","trees_url":"https://api.github.com/repos/WChrisK/pyta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WChrisK/pyta/statuses/{sha}","languages_url":"https://api.github.com/repos/WChrisK/pyta/languages","stargazers_url":"https://api.github.com/repos/WChrisK/pyta/stargazers","contributors_url":"https://api.github.com/repos/WChrisK/pyta/contributors","subscribers_url":"https://api.github.com/repos/WChrisK/pyta/subscribers","subscription_url":"https://api.github.com/repos/WChrisK/pyta/subscription","commits_url":"https://api.github.com/repos/WChrisK/pyta/commits{/sha}","git_commits_url":"https://api.github.com/repos/WChrisK/pyta/git/commits{/sha}","comments_url":"https://api.github.com/repos/WChrisK/pyta/comments{/number}","issue_comment_url":"https://api.github.com/repos/WChrisK/pyta/issues/comments{/number}","contents_url":"https://api.github.com/repos/WChrisK/pyta/contents/{+path}","compare_url":"https://api.github.com/repos/WChrisK/pyta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WChrisK/pyta/merges","archive_url":"https://api.github.com/repos/WChrisK/pyta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WChrisK/pyta/downloads","issues_url":"https://api.github.com/repos/WChrisK/pyta/issues{/number}","pulls_url":"https://api.github.com/repos/WChrisK/pyta/pulls{/number}","milestones_url":"https://api.github.com/repos/WChrisK/pyta/milestones{/number}","notifications_url":"https://api.github.com/repos/WChrisK/pyta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WChrisK/pyta/labels{/name}","releases_url":"https://api.github.com/repos/WChrisK/pyta/releases{/id}","deployments_url":"https://api.github.com/repos/WChrisK/pyta/deployments","created_at":"2016-05-03T01:09:51Z","updated_at":"2016-05-03T01:09:52Z","pushed_at":"2016-06-05T15:52:42Z","git_url":"git://github.com/WChrisK/pyta.git","ssh_url":"git@github.com:WChrisK/pyta.git","clone_url":"https://github.com/WChrisK/pyta.git","svn_url":"https://github.com/WChrisK/pyta","homepage":null,"size":107,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"pyta-uoft:master","ref":"master","sha":"41dd37747e649b605e0174f0d6caec6c60b26d37","user":{"login":"pyta-uoft","id":18420574,"avatar_url":"https://avatars.githubusercontent.com/u/18420574?v=3","gravatar_id":"","url":"https://api.github.com/users/pyta-uoft","html_url":"https://github.com/pyta-uoft","followers_url":"https://api.github.com/users/pyta-uoft/followers","following_url":"https://api.github.com/users/pyta-uoft/following{/other_user}","gists_url":"https://api.github.com/users/pyta-uoft/gists{/gist_id}","starred_url":"https://api.github.com/users/pyta-uoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyta-uoft/subscriptions","organizations_url":"https://api.github.com/users/pyta-uoft/orgs","repos_url":"https://api.github.com/users/pyta-uoft/repos","events_url":"https://api.github.com/users/pyta-uoft/events{/privacy}","received_events_url":"https://api.github.com/users/pyta-uoft/received_events","type":"Organization","site_admin":false},"repo":{"id":52238733,"name":"pyta","full_name":"pyta-uoft/pyta","owner":{"login":"pyta-uoft","id":18420574,"avatar_url":"https://avatars.githubusercontent.com/u/18420574?v=3","gravatar_id":"","url":"https://api.github.com/users/pyta-uoft","html_url":"https://github.com/pyta-uoft","followers_url":"https://api.github.com/users/pyta-uoft/followers","following_url":"https://api.github.com/users/pyta-uoft/following{/other_user}","gists_url":"https://api.github.com/users/pyta-uoft/gists{/gist_id}","starred_url":"https://api.github.com/users/pyta-uoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyta-uoft/subscriptions","organizations_url":"https://api.github.com/users/pyta-uoft/orgs","repos_url":"https://api.github.com/users/pyta-uoft/repos","events_url":"https://api.github.com/users/pyta-uoft/events{/privacy}","received_events_url":"https://api.github.com/users/pyta-uoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pyta-uoft/pyta","description":"Adventures in code analysis for teaching Python.","fork":false,"url":"https://api.github.com/repos/pyta-uoft/pyta","forks_url":"https://api.github.com/repos/pyta-uoft/pyta/forks","keys_url":"https://api.github.com/repos/pyta-uoft/pyta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pyta-uoft/pyta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pyta-uoft/pyta/teams","hooks_url":"https://api.github.com/repos/pyta-uoft/pyta/hooks","issue_events_url":"https://api.github.com/repos/pyta-uoft/pyta/issues/events{/number}","events_url":"https://api.github.com/repos/pyta-uoft/pyta/events","assignees_url":"https://api.github.com/repos/pyta-uoft/pyta/assignees{/user}","branches_url":"https://api.github.com/repos/pyta-uoft/pyta/branches{/branch}","tags_url":"https://api.github.com/repos/pyta-uoft/pyta/tags","blobs_url":"https://api.github.com/repos/pyta-uoft/pyta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pyta-uoft/pyta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pyta-uoft/pyta/git/refs{/sha}","trees_url":"https://api.github.com/repos/pyta-uoft/pyta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pyta-uoft/pyta/statuses/{sha}","languages_url":"https://api.github.com/repos/pyta-uoft/pyta/languages","stargazers_url":"https://api.github.com/repos/pyta-uoft/pyta/stargazers","contributors_url":"https://api.github.com/repos/pyta-uoft/pyta/contributors","subscribers_url":"https://api.github.com/repos/pyta-uoft/pyta/subscribers","subscription_url":"https://api.github.com/repos/pyta-uoft/pyta/subscription","commits_url":"https://api.github.com/repos/pyta-uoft/pyta/commits{/sha}","git_commits_url":"https://api.github.com/repos/pyta-uoft/pyta/git/commits{/sha}","comments_url":"https://api.github.com/repos/pyta-uoft/pyta/comments{/number}","issue_comment_url":"https://api.github.com/repos/pyta-uoft/pyta/issues/comments{/number}","contents_url":"https://api.github.com/repos/pyta-uoft/pyta/contents/{+path}","compare_url":"https://api.github.com/repos/pyta-uoft/pyta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pyta-uoft/pyta/merges","archive_url":"https://api.github.com/repos/pyta-uoft/pyta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pyta-uoft/pyta/downloads","issues_url":"https://api.github.com/repos/pyta-uoft/pyta/issues{/number}","pulls_url":"https://api.github.com/repos/pyta-uoft/pyta/pulls{/number}","milestones_url":"https://api.github.com/repos/pyta-uoft/pyta/milestones{/number}","notifications_url":"https://api.github.com/repos/pyta-uoft/pyta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pyta-uoft/pyta/labels{/name}","releases_url":"https://api.github.com/repos/pyta-uoft/pyta/releases{/id}","deployments_url":"https://api.github.com/repos/pyta-uoft/pyta/deployments","created_at":"2016-02-22T01:38:12Z","updated_at":"2016-06-03T23:38:25Z","pushed_at":"2016-06-06T23:25:49Z","git_url":"git://github.com/pyta-uoft/pyta.git","ssh_url":"git@github.com:pyta-uoft/pyta.git","clone_url":"https://github.com/pyta-uoft/pyta.git","svn_url":"https://github.com/pyta-uoft/pyta","homepage":null,"size":165,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":22,"forks":6,"open_issues":22,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pyta-uoft/pyta/pulls/55"},"html":{"href":"https://github.com/pyta-uoft/pyta/pull/55"},"issue":{"href":"https://api.github.com/repos/pyta-uoft/pyta/issues/55"},"comments":{"href":"https://api.github.com/repos/pyta-uoft/pyta/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/pyta-uoft/pyta/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/pyta-uoft/pyta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pyta-uoft/pyta/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/pyta-uoft/pyta/statuses/f50780b313a95955f3c4c5d8afd721999014dfcc"}}}}
{"actor":{"display_login":"david-yz-liu"}}