{"action":"created","comment":{"url":"https://api.github.com/repos/python/mypy/pulls/comments/109287493","pull_request_review_id":30384626,"id":109287493,"diff_hunk":"@@ -43,6 +43,9 @@ def analyze_type_alias(node: Expression,\n     # that we don't support straight string literals as type aliases\n     # (only string literals within index expressions).\n     if isinstance(node, RefExpr):\n+        # Note that this misses the case where someone tried to use a\n+        # class-referenced type variable as a type alias.  It's easier to catch\n+        # that one in checkmemeber.py","path":"mypy/typeanal.py","position":6,"original_position":6,"commit_id":"7b8e409af5d6e8879bc814544bc7c253dae2f8bc","original_commit_id":"7b8e409af5d6e8879bc814544bc7c253dae2f8bc","user":{"login":"JelleZijlstra","id":906600,"avatar_url":"https://avatars3.githubusercontent.com/u/906600?v=3","gravatar_id":"","url":"https://api.github.com/users/JelleZijlstra","html_url":"https://github.com/JelleZijlstra","followers_url":"https://api.github.com/users/JelleZijlstra/followers","following_url":"https://api.github.com/users/JelleZijlstra/following{/other_user}","gists_url":"https://api.github.com/users/JelleZijlstra/gists{/gist_id}","starred_url":"https://api.github.com/users/JelleZijlstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JelleZijlstra/subscriptions","organizations_url":"https://api.github.com/users/JelleZijlstra/orgs","repos_url":"https://api.github.com/users/JelleZijlstra/repos","events_url":"https://api.github.com/users/JelleZijlstra/events{/privacy}","received_events_url":"https://api.github.com/users/JelleZijlstra/received_events","type":"User","site_admin":false},"body":"small typo: checkmember.py","created_at":"2017-04-01T15:43:25Z","updated_at":"2017-04-01T15:44:57Z","html_url":"https://github.com/python/mypy/pull/3105#discussion_r109287493","pull_request_url":"https://api.github.com/repos/python/mypy/pulls/3105","_links":{"self":{"href":"https://api.github.com/repos/python/mypy/pulls/comments/109287493"},"html":{"href":"https://github.com/python/mypy/pull/3105#discussion_r109287493"},"pull_request":{"href":"https://api.github.com/repos/python/mypy/pulls/3105"}}},"pull_request":{"url":"https://api.github.com/repos/python/mypy/pulls/3105","id":113771860,"html_url":"https://github.com/python/mypy/pull/3105","diff_url":"https://github.com/python/mypy/pull/3105.diff","patch_url":"https://github.com/python/mypy/pull/3105.patch","issue_url":"https://api.github.com/repos/python/mypy/issues/3105","number":3105,"state":"open","locked":false,"title":"Make it an error to use a class-attribute type var outside a type","user":{"login":"sixolet","id":1633505,"avatar_url":"https://avatars2.githubusercontent.com/u/1633505?v=3","gravatar_id":"","url":"https://api.github.com/users/sixolet","html_url":"https://github.com/sixolet","followers_url":"https://api.github.com/users/sixolet/followers","following_url":"https://api.github.com/users/sixolet/following{/other_user}","gists_url":"https://api.github.com/users/sixolet/gists{/gist_id}","starred_url":"https://api.github.com/users/sixolet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sixolet/subscriptions","organizations_url":"https://api.github.com/users/sixolet/orgs","repos_url":"https://api.github.com/users/sixolet/repos","events_url":"https://api.github.com/users/sixolet/events{/privacy}","received_events_url":"https://api.github.com/users/sixolet/received_events","type":"User","site_admin":false},"body":"Previously, e9d28a0 fixed a crash when you tried to access a class-attribute\r\ntype variable. The test in that commit involved assigning a variable the value\r\nof the typevar. It resulted in no crash, but rather treating the variable as\r\nbeing an instance of the type the typevar bound to, later, which is incorrect.\r\n\r\nFor example (and this is the test defined in e9d28a0, modified)\r\n\r\n```python\r\n from typing import TypeVar\r\n class C:\r\n     T = TypeVar('T', int)\r\n     def f(self, x: T) -> T:\r\n         A = C.T\r\n         reveal_type(A)  # E: revealed type is \"T`-1\"\r\n         return x\r\n```\r\n\r\nInstead, this PR treats such an assignment as an error -- any reference to such a classvar tvar outside trying to construct a type out of it is an error.\r\n\r\nAlso test a *correct* alias with the typevar access method in question -- it\r\nworks.","created_at":"2017-04-01T09:18:32Z","updated_at":"2017-04-01T15:44:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bdc2b882d844c91df2acd611fcdbcd8249ca6ad4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/python/mypy/pulls/3105/commits","review_comments_url":"https://api.github.com/repos/python/mypy/pulls/3105/comments","review_comment_url":"https://api.github.com/repos/python/mypy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/python/mypy/issues/3105/comments","statuses_url":"https://api.github.com/repos/python/mypy/statuses/7b8e409af5d6e8879bc814544bc7c253dae2f8bc","head":{"label":"sixolet:classvar-tvar-aliasing","ref":"classvar-tvar-aliasing","sha":"7b8e409af5d6e8879bc814544bc7c253dae2f8bc","user":{"login":"sixolet","id":1633505,"avatar_url":"https://avatars2.githubusercontent.com/u/1633505?v=3","gravatar_id":"","url":"https://api.github.com/users/sixolet","html_url":"https://github.com/sixolet","followers_url":"https://api.github.com/users/sixolet/followers","following_url":"https://api.github.com/users/sixolet/following{/other_user}","gists_url":"https://api.github.com/users/sixolet/gists{/gist_id}","starred_url":"https://api.github.com/users/sixolet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sixolet/subscriptions","organizations_url":"https://api.github.com/users/sixolet/orgs","repos_url":"https://api.github.com/users/sixolet/repos","events_url":"https://api.github.com/users/sixolet/events{/privacy}","received_events_url":"https://api.github.com/users/sixolet/received_events","type":"User","site_admin":false},"repo":{"id":64433254,"name":"mypy","full_name":"sixolet/mypy","owner":{"login":"sixolet","id":1633505,"avatar_url":"https://avatars2.githubusercontent.com/u/1633505?v=3","gravatar_id":"","url":"https://api.github.com/users/sixolet","html_url":"https://github.com/sixolet","followers_url":"https://api.github.com/users/sixolet/followers","following_url":"https://api.github.com/users/sixolet/following{/other_user}","gists_url":"https://api.github.com/users/sixolet/gists{/gist_id}","starred_url":"https://api.github.com/users/sixolet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sixolet/subscriptions","organizations_url":"https://api.github.com/users/sixolet/orgs","repos_url":"https://api.github.com/users/sixolet/repos","events_url":"https://api.github.com/users/sixolet/events{/privacy}","received_events_url":"https://api.github.com/users/sixolet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sixolet/mypy","description":"Optional static typing for Python 2 and 3 (PEP484)","fork":true,"url":"https://api.github.com/repos/sixolet/mypy","forks_url":"https://api.github.com/repos/sixolet/mypy/forks","keys_url":"https://api.github.com/repos/sixolet/mypy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sixolet/mypy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sixolet/mypy/teams","hooks_url":"https://api.github.com/repos/sixolet/mypy/hooks","issue_events_url":"https://api.github.com/repos/sixolet/mypy/issues/events{/number}","events_url":"https://api.github.com/repos/sixolet/mypy/events","assignees_url":"https://api.github.com/repos/sixolet/mypy/assignees{/user}","branches_url":"https://api.github.com/repos/sixolet/mypy/branches{/branch}","tags_url":"https://api.github.com/repos/sixolet/mypy/tags","blobs_url":"https://api.github.com/repos/sixolet/mypy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sixolet/mypy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sixolet/mypy/git/refs{/sha}","trees_url":"https://api.github.com/repos/sixolet/mypy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sixolet/mypy/statuses/{sha}","languages_url":"https://api.github.com/repos/sixolet/mypy/languages","stargazers_url":"https://api.github.com/repos/sixolet/mypy/stargazers","contributors_url":"https://api.github.com/repos/sixolet/mypy/contributors","subscribers_url":"https://api.github.com/repos/sixolet/mypy/subscribers","subscription_url":"https://api.github.com/repos/sixolet/mypy/subscription","commits_url":"https://api.github.com/repos/sixolet/mypy/commits{/sha}","git_commits_url":"https://api.github.com/repos/sixolet/mypy/git/commits{/sha}","comments_url":"https://api.github.com/repos/sixolet/mypy/comments{/number}","issue_comment_url":"https://api.github.com/repos/sixolet/mypy/issues/comments{/number}","contents_url":"https://api.github.com/repos/sixolet/mypy/contents/{+path}","compare_url":"https://api.github.com/repos/sixolet/mypy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sixolet/mypy/merges","archive_url":"https://api.github.com/repos/sixolet/mypy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sixolet/mypy/downloads","issues_url":"https://api.github.com/repos/sixolet/mypy/issues{/number}","pulls_url":"https://api.github.com/repos/sixolet/mypy/pulls{/number}","milestones_url":"https://api.github.com/repos/sixolet/mypy/milestones{/number}","notifications_url":"https://api.github.com/repos/sixolet/mypy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sixolet/mypy/labels{/name}","releases_url":"https://api.github.com/repos/sixolet/mypy/releases{/id}","deployments_url":"https://api.github.com/repos/sixolet/mypy/deployments","created_at":"2016-07-28T22:51:22Z","updated_at":"2016-07-28T22:51:24Z","pushed_at":"2017-04-01T09:19:57Z","git_url":"git://github.com/sixolet/mypy.git","ssh_url":"git@github.com:sixolet/mypy.git","clone_url":"https://github.com/sixolet/mypy.git","svn_url":"https://github.com/sixolet/mypy","homepage":"http://www.mypy-lang.org/","size":19218,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"python:master","ref":"master","sha":"5b2c62609d971a2b94b2a814a9e5e26d33d30af0","user":{"login":"python","id":1525981,"avatar_url":"https://avatars0.githubusercontent.com/u/1525981?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"Organization","site_admin":false},"repo":{"id":7053637,"name":"mypy","full_name":"python/mypy","owner":{"login":"python","id":1525981,"avatar_url":"https://avatars0.githubusercontent.com/u/1525981?v=3","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/python/mypy","description":"Optional static typing for Python 2 and 3 (PEP484)","fork":false,"url":"https://api.github.com/repos/python/mypy","forks_url":"https://api.github.com/repos/python/mypy/forks","keys_url":"https://api.github.com/repos/python/mypy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python/mypy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python/mypy/teams","hooks_url":"https://api.github.com/repos/python/mypy/hooks","issue_events_url":"https://api.github.com/repos/python/mypy/issues/events{/number}","events_url":"https://api.github.com/repos/python/mypy/events","assignees_url":"https://api.github.com/repos/python/mypy/assignees{/user}","branches_url":"https://api.github.com/repos/python/mypy/branches{/branch}","tags_url":"https://api.github.com/repos/python/mypy/tags","blobs_url":"https://api.github.com/repos/python/mypy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/python/mypy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/python/mypy/git/refs{/sha}","trees_url":"https://api.github.com/repos/python/mypy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python/mypy/statuses/{sha}","languages_url":"https://api.github.com/repos/python/mypy/languages","stargazers_url":"https://api.github.com/repos/python/mypy/stargazers","contributors_url":"https://api.github.com/repos/python/mypy/contributors","subscribers_url":"https://api.github.com/repos/python/mypy/subscribers","subscription_url":"https://api.github.com/repos/python/mypy/subscription","commits_url":"https://api.github.com/repos/python/mypy/commits{/sha}","git_commits_url":"https://api.github.com/repos/python/mypy/git/commits{/sha}","comments_url":"https://api.github.com/repos/python/mypy/comments{/number}","issue_comment_url":"https://api.github.com/repos/python/mypy/issues/comments{/number}","contents_url":"https://api.github.com/repos/python/mypy/contents/{+path}","compare_url":"https://api.github.com/repos/python/mypy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python/mypy/merges","archive_url":"https://api.github.com/repos/python/mypy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python/mypy/downloads","issues_url":"https://api.github.com/repos/python/mypy/issues{/number}","pulls_url":"https://api.github.com/repos/python/mypy/pulls{/number}","milestones_url":"https://api.github.com/repos/python/mypy/milestones{/number}","notifications_url":"https://api.github.com/repos/python/mypy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python/mypy/labels{/name}","releases_url":"https://api.github.com/repos/python/mypy/releases{/id}","deployments_url":"https://api.github.com/repos/python/mypy/deployments","created_at":"2012-12-07T13:30:23Z","updated_at":"2017-04-01T14:05:46Z","pushed_at":"2017-04-01T09:19:59Z","git_url":"git://github.com/python/mypy.git","ssh_url":"git@github.com:python/mypy.git","clone_url":"https://github.com/python/mypy.git","svn_url":"https://github.com/python/mypy","homepage":"http://www.mypy-lang.org/","size":19037,"stargazers_count":2366,"watchers_count":2366,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":281,"mirror_url":null,"open_issues_count":613,"forks":281,"open_issues":613,"watchers":2366,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/python/mypy/pulls/3105"},"html":{"href":"https://github.com/python/mypy/pull/3105"},"issue":{"href":"https://api.github.com/repos/python/mypy/issues/3105"},"comments":{"href":"https://api.github.com/repos/python/mypy/issues/3105/comments"},"review_comments":{"href":"https://api.github.com/repos/python/mypy/pulls/3105/comments"},"review_comment":{"href":"https://api.github.com/repos/python/mypy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/python/mypy/pulls/3105/commits"},"statuses":{"href":"https://api.github.com/repos/python/mypy/statuses/7b8e409af5d6e8879bc814544bc7c253dae2f8bc"}}}}
{"actor":{"display_login":"JelleZijlstra"}}