{"action":"created","issue":{"url":"https://api.github.com/repos/python/mypy/issues/2241","repository_url":"https://api.github.com/repos/python/mypy","labels_url":"https://api.github.com/repos/python/mypy/issues/2241/labels{/name}","comments_url":"https://api.github.com/repos/python/mypy/issues/2241/comments","events_url":"https://api.github.com/repos/python/mypy/issues/2241/events","html_url":"https://github.com/python/mypy/issues/2241","id":182303986,"number":2241,"title":"Forward reference to a type alias results in an \"Invalid type ...\" error","user":{"login":"jstasiak","id":36209,"avatar_url":"https://avatars.githubusercontent.com/u/36209?v=3","gravatar_id":"","url":"https://api.github.com/users/jstasiak","html_url":"https://github.com/jstasiak","followers_url":"https://api.github.com/users/jstasiak/followers","following_url":"https://api.github.com/users/jstasiak/following{/other_user}","gists_url":"https://api.github.com/users/jstasiak/gists{/gist_id}","starred_url":"https://api.github.com/users/jstasiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstasiak/subscriptions","organizations_url":"https://api.github.com/users/jstasiak/orgs","repos_url":"https://api.github.com/users/jstasiak/repos","events_url":"https://api.github.com/users/jstasiak/events{/privacy}","received_events_url":"https://api.github.com/users/jstasiak/received_events","type":"User","site_admin":false},"labels":[{"id":21488356,"url":"https://api.github.com/repos/python/mypy/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/python/mypy/milestones/6","html_url":"https://github.com/python/mypy/milestones/0.5","labels_url":"https://api.github.com/repos/python/mypy/milestones/6/labels","id":1616659,"number":6,"title":"0.5","description":"Possibly we'll declare 0.5 when we make strict optional checking the default.","creator":{"login":"ddfisher","id":245905,"avatar_url":"https://avatars.githubusercontent.com/u/245905?v=3","gravatar_id":"","url":"https://api.github.com/users/ddfisher","html_url":"https://github.com/ddfisher","followers_url":"https://api.github.com/users/ddfisher/followers","following_url":"https://api.github.com/users/ddfisher/following{/other_user}","gists_url":"https://api.github.com/users/ddfisher/gists{/gist_id}","starred_url":"https://api.github.com/users/ddfisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddfisher/subscriptions","organizations_url":"https://api.github.com/users/ddfisher/orgs","repos_url":"https://api.github.com/users/ddfisher/repos","events_url":"https://api.github.com/users/ddfisher/events{/privacy}","received_events_url":"https://api.github.com/users/ddfisher/received_events","type":"User","site_admin":false},"open_issues":108,"closed_issues":37,"state":"open","created_at":"2016-03-01T23:42:18Z","updated_at":"2016-11-28T19:28:27Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-10-11T15:57:04Z","updated_at":"2016-12-01T03:48:59Z","closed_at":null,"body":"mypy 0.4.5 and 0.4.4, CPython 3.5.1 and 3.5.2.\n\nCode:\n\n``` python\n# code.py\ndef f(p: 'Alias') -> None:\n    print(p)\n\nAlias = int\n```\n\nExpected result:\n\n```\n% mypy code.py\n%\n```\n\nActual result:\n\n```\n% mypy code.py\ncode.py: note: In function \"f\":\ncode.py:1: error: Invalid type \"code.Alias\"\n%\n```\n"},"comment":{"url":"https://api.github.com/repos/python/mypy/issues/comments/264071651","html_url":"https://github.com/python/mypy/issues/2241#issuecomment-264071651","issue_url":"https://api.github.com/repos/python/mypy/issues/2241","id":264071651,"user":{"login":"TRManderson","id":2503403,"avatar_url":"https://avatars.githubusercontent.com/u/2503403?v=3","gravatar_id":"","url":"https://api.github.com/users/TRManderson","html_url":"https://github.com/TRManderson","followers_url":"https://api.github.com/users/TRManderson/followers","following_url":"https://api.github.com/users/TRManderson/following{/other_user}","gists_url":"https://api.github.com/users/TRManderson/gists{/gist_id}","starred_url":"https://api.github.com/users/TRManderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TRManderson/subscriptions","organizations_url":"https://api.github.com/users/TRManderson/orgs","repos_url":"https://api.github.com/users/TRManderson/repos","events_url":"https://api.github.com/users/TRManderson/events{/privacy}","received_events_url":"https://api.github.com/users/TRManderson/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T03:48:59Z","updated_at":"2016-12-01T03:48:59Z","body":"As far as I can tell, it is currently not possible to represent the output of `json.load` with types due to this.\r\n\r\n`JSON = Union[None, str, int, float, bool, List['JSON'], Dict[str, 'JSON']]`\r\n\r\nAdding newtypes in various bits didn't help the situation, I'm still getting 'Invalid type'"}}
{"actor":{"display_login":"TRManderson"}}