{"action":"created","comment":{"url":"https://api.github.com/repos/pyta-uoft/pyta/pulls/comments/198619145","pull_request_review_id":132576356,"id":198619145,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODYxOTE0NQ==","diff_hunk":"@@ -52,33 +99,70 @@ class TypeFail(TypeResult):\n     \"\"\"Represents the result of a failed type check operation\n     Contains error message\n     \"\"\"\n-\n-    def __init__(self, tnode1: _TNode = None, tnode2: _TNode = None, src_node: NodeNG = None):\n-        if isinstance(tnode1, str):\n-            self.msg = tnode1\n-            self.tnode1 = None\n-        else:\n-            self.tnode1 = tnode1\n-            self.msg = \"\"\n-        self.tnode2 = tnode2\n-        self.src_node = src_node\n+    def __init__(self, msg: str):\n+        self.msg = msg\n         super().__init__(self.msg)\n \n     def __str__(self):\n-        if self.tnode1 is None:\n-            return f'TypeFail: {self.msg}'\n-        if self.src_node:\n-            return 'TypeFail: %s <-> %s at %s' % \\\n-                   (self.tnode1.type, self.tnode2.type, self.src_node.as_string())\n-        else:\n-            return 'TypeFail: %s <-> %s' % (self.tnode1.type, self.tnode2.type)\n+        return f'TypeFail: {self.msg}'\n \n     def bind(self, _):\n         return self\n \n     def add_msg(self, msg: str):\n         self.msg = msg\n \n+    def get_reasons(self):","path":"python_ta/typecheck/base.py","position":94,"original_position":94,"commit_id":"042fb2bc93771c3fb1bafb6fa484387466d6d821","original_commit_id":"042fb2bc93771c3fb1bafb6fa484387466d6d821","user":{"login":"david-yz-liu","id":3333115,"node_id":"MDQ6VXNlcjMzMzMxMTU=","avatar_url":"https://avatars2.githubusercontent.com/u/3333115?v=4","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":"Remove this. For now it's enough to store the \"path\" in the nodes themselves. This method is too restrictive.","created_at":"2018-06-27T19:49:05Z","updated_at":"2018-06-27T19:54:57Z","html_url":"https://github.com/pyta-uoft/pyta/pull/423#discussion_r198619145","pull_request_url":"https://api.github.com/repos/pyta-uoft/pyta/pulls/423","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/pyta-uoft/pyta/pulls/comments/198619145"},"html":{"href":"https://github.com/pyta-uoft/pyta/pull/423#discussion_r198619145"},"pull_request":{"href":"https://api.github.com/repos/pyta-uoft/pyta/pulls/423"}}},"pull_request":{"url":"https://api.github.com/repos/pyta-uoft/pyta/pulls/423","id":197812420,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3ODEyNDIw","html_url":"https://github.com/pyta-uoft/pyta/pull/423","diff_url":"https://github.com/pyta-uoft/pyta/pull/423.diff","patch_url":"https://github.com/pyta-uoft/pyta/pull/423.patch","issue_url":"https://api.github.com/repos/pyta-uoft/pyta/issues/423","number":423,"state":"open","locked":false,"title":"typecheck: Adding TypeFailUnify subclass and relevant tests","user":{"login":"justinpark715","id":35385757,"node_id":"MDQ6VXNlcjM1Mzg1NzU3","avatar_url":"https://avatars0.githubusercontent.com/u/35385757?v=4","gravatar_id":"","url":"https://api.github.com/users/justinpark715","html_url":"https://github.com/justinpark715","followers_url":"https://api.github.com/users/justinpark715/followers","following_url":"https://api.github.com/users/justinpark715/following{/other_user}","gists_url":"https://api.github.com/users/justinpark715/gists{/gist_id}","starred_url":"https://api.github.com/users/justinpark715/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinpark715/subscriptions","organizations_url":"https://api.github.com/users/justinpark715/orgs","repos_url":"https://api.github.com/users/justinpark715/repos","events_url":"https://api.github.com/users/justinpark715/events{/privacy}","received_events_url":"https://api.github.com/users/justinpark715/received_events","type":"User","site_admin":false},"body":"Adding TypeFail subclass `TypeFailUnify` with `get_reasons()` function, to be used by checkers and reporters to generate comprehensive error messages\r\nAdding `find_path` function to `_TNode`, to be used by `get_reasons()` to find a chain of type inferences\r\nModifying `_find_type_fail` in test_tnode_structure.py to be used by other test files\r\nAdding relevant test cases \r\n","created_at":"2018-06-27T18:13:25Z","updated_at":"2018-06-27T19:54:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7bc913c59ee6a5d2d513ff2790e47b6ba3d185b5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pyta-uoft/pyta/pulls/423/commits","review_comments_url":"https://api.github.com/repos/pyta-uoft/pyta/pulls/423/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/423/comments","statuses_url":"https://api.github.com/repos/pyta-uoft/pyta/statuses/042fb2bc93771c3fb1bafb6fa484387466d6d821","head":{"label":"justinpark715:typefailunify","ref":"typefailunify","sha":"042fb2bc93771c3fb1bafb6fa484387466d6d821","user":{"login":"justinpark715","id":35385757,"node_id":"MDQ6VXNlcjM1Mzg1NzU3","avatar_url":"https://avatars0.githubusercontent.com/u/35385757?v=4","gravatar_id":"","url":"https://api.github.com/users/justinpark715","html_url":"https://github.com/justinpark715","followers_url":"https://api.github.com/users/justinpark715/followers","following_url":"https://api.github.com/users/justinpark715/following{/other_user}","gists_url":"https://api.github.com/users/justinpark715/gists{/gist_id}","starred_url":"https://api.github.com/users/justinpark715/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinpark715/subscriptions","organizations_url":"https://api.github.com/users/justinpark715/orgs","repos_url":"https://api.github.com/users/justinpark715/repos","events_url":"https://api.github.com/users/justinpark715/events{/privacy}","received_events_url":"https://api.github.com/users/justinpark715/received_events","type":"User","site_admin":false},"repo":{"id":131714200,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE3MTQyMDA=","name":"pyta","full_name":"justinpark715/pyta","owner":{"login":"justinpark715","id":35385757,"node_id":"MDQ6VXNlcjM1Mzg1NzU3","avatar_url":"https://avatars0.githubusercontent.com/u/35385757?v=4","gravatar_id":"","url":"https://api.github.com/users/justinpark715","html_url":"https://github.com/justinpark715","followers_url":"https://api.github.com/users/justinpark715/followers","following_url":"https://api.github.com/users/justinpark715/following{/other_user}","gists_url":"https://api.github.com/users/justinpark715/gists{/gist_id}","starred_url":"https://api.github.com/users/justinpark715/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinpark715/subscriptions","organizations_url":"https://api.github.com/users/justinpark715/orgs","repos_url":"https://api.github.com/users/justinpark715/repos","events_url":"https://api.github.com/users/justinpark715/events{/privacy}","received_events_url":"https://api.github.com/users/justinpark715/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/justinpark715/pyta","description":"Adventures in code analysis for teaching Python.","fork":true,"url":"https://api.github.com/repos/justinpark715/pyta","forks_url":"https://api.github.com/repos/justinpark715/pyta/forks","keys_url":"https://api.github.com/repos/justinpark715/pyta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/justinpark715/pyta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/justinpark715/pyta/teams","hooks_url":"https://api.github.com/repos/justinpark715/pyta/hooks","issue_events_url":"https://api.github.com/repos/justinpark715/pyta/issues/events{/number}","events_url":"https://api.github.com/repos/justinpark715/pyta/events","assignees_url":"https://api.github.com/repos/justinpark715/pyta/assignees{/user}","branches_url":"https://api.github.com/repos/justinpark715/pyta/branches{/branch}","tags_url":"https://api.github.com/repos/justinpark715/pyta/tags","blobs_url":"https://api.github.com/repos/justinpark715/pyta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/justinpark715/pyta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/justinpark715/pyta/git/refs{/sha}","trees_url":"https://api.github.com/repos/justinpark715/pyta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/justinpark715/pyta/statuses/{sha}","languages_url":"https://api.github.com/repos/justinpark715/pyta/languages","stargazers_url":"https://api.github.com/repos/justinpark715/pyta/stargazers","contributors_url":"https://api.github.com/repos/justinpark715/pyta/contributors","subscribers_url":"https://api.github.com/repos/justinpark715/pyta/subscribers","subscription_url":"https://api.github.com/repos/justinpark715/pyta/subscription","commits_url":"https://api.github.com/repos/justinpark715/pyta/commits{/sha}","git_commits_url":"https://api.github.com/repos/justinpark715/pyta/git/commits{/sha}","comments_url":"https://api.github.com/repos/justinpark715/pyta/comments{/number}","issue_comment_url":"https://api.github.com/repos/justinpark715/pyta/issues/comments{/number}","contents_url":"https://api.github.com/repos/justinpark715/pyta/contents/{+path}","compare_url":"https://api.github.com/repos/justinpark715/pyta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/justinpark715/pyta/merges","archive_url":"https://api.github.com/repos/justinpark715/pyta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/justinpark715/pyta/downloads","issues_url":"https://api.github.com/repos/justinpark715/pyta/issues{/number}","pulls_url":"https://api.github.com/repos/justinpark715/pyta/pulls{/number}","milestones_url":"https://api.github.com/repos/justinpark715/pyta/milestones{/number}","notifications_url":"https://api.github.com/repos/justinpark715/pyta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/justinpark715/pyta/labels{/name}","releases_url":"https://api.github.com/repos/justinpark715/pyta/releases{/id}","deployments_url":"https://api.github.com/repos/justinpark715/pyta/deployments","created_at":"2018-05-01T13:07:54Z","updated_at":"2018-06-26T16:03:47Z","pushed_at":"2018-06-27T19:40:07Z","git_url":"git://github.com/justinpark715/pyta.git","ssh_url":"git@github.com:justinpark715/pyta.git","clone_url":"https://github.com/justinpark715/pyta.git","svn_url":"https://github.com/justinpark715/pyta","homepage":null,"size":3143,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pyta-uoft:master","ref":"master","sha":"60acb3f7cd14a98ed89d99b5efe901358ba8b973","user":{"login":"pyta-uoft","id":18420574,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4NDIwNTc0","avatar_url":"https://avatars1.githubusercontent.com/u/18420574?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk1MjIzODczMw==","name":"pyta","full_name":"pyta-uoft/pyta","owner":{"login":"pyta-uoft","id":18420574,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4NDIwNTc0","avatar_url":"https://avatars1.githubusercontent.com/u/18420574?v=4","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":"2018-06-27T01:00:39Z","pushed_at":"2018-06-27T19:40: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":1552,"stargazers_count":28,"watchers_count":28,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":19,"open_issues":18,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pyta-uoft/pyta/pulls/423"},"html":{"href":"https://github.com/pyta-uoft/pyta/pull/423"},"issue":{"href":"https://api.github.com/repos/pyta-uoft/pyta/issues/423"},"comments":{"href":"https://api.github.com/repos/pyta-uoft/pyta/issues/423/comments"},"review_comments":{"href":"https://api.github.com/repos/pyta-uoft/pyta/pulls/423/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/423/commits"},"statuses":{"href":"https://api.github.com/repos/pyta-uoft/pyta/statuses/042fb2bc93771c3fb1bafb6fa484387466d6d821"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"david-yz-liu"}}