{"action":"created","issue":{"url":"https://api.github.com/repos/python/typeshed/issues/2417","repository_url":"https://api.github.com/repos/python/typeshed","labels_url":"https://api.github.com/repos/python/typeshed/issues/2417/labels{/name}","comments_url":"https://api.github.com/repos/python/typeshed/issues/2417/comments","events_url":"https://api.github.com/repos/python/typeshed/issues/2417/events","html_url":"https://github.com/python/typeshed/issues/2417","id":353983070,"node_id":"MDU6SXNzdWUzNTM5ODMwNzA=","number":2417,"title":"EmailMessage missing from email.parser","user":{"login":"jrideout","id":197338,"node_id":"MDQ6VXNlcjE5NzMzOA==","avatar_url":"https://avatars1.githubusercontent.com/u/197338?v=4","gravatar_id":"","url":"https://api.github.com/users/jrideout","html_url":"https://github.com/jrideout","followers_url":"https://api.github.com/users/jrideout/followers","following_url":"https://api.github.com/users/jrideout/following{/other_user}","gists_url":"https://api.github.com/users/jrideout/gists{/gist_id}","starred_url":"https://api.github.com/users/jrideout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrideout/subscriptions","organizations_url":"https://api.github.com/users/jrideout/orgs","repos_url":"https://api.github.com/users/jrideout/repos","events_url":"https://api.github.com/users/jrideout/events{/privacy}","received_events_url":"https://api.github.com/users/jrideout/received_events","type":"User","site_admin":false},"labels":[{"id":513243473,"node_id":"MDU6TGFiZWw1MTMyNDM0NzM=","url":"https://api.github.com/repos/python/typeshed/labels/size-small","name":"size-small","color":"f0f0f0","default":false},{"id":183450926,"node_id":"MDU6TGFiZWwxODM0NTA5MjY=","url":"https://api.github.com/repos/python/typeshed/labels/type-false-positive","name":"type-false-positive","color":"ff6666","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-25T04:38:27Z","updated_at":"2018-11-19T11:38:18Z","closed_at":null,"author_association":"NONE","body":"If `policy.default` is set, then methods like `email.message_from_file` will return `EmailMessage` rather than just `Message`"},"comment":{"url":"https://api.github.com/repos/python/typeshed/issues/comments/439864475","html_url":"https://github.com/python/typeshed/issues/2417#issuecomment-439864475","issue_url":"https://api.github.com/repos/python/typeshed/issues/2417","id":439864475,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTg2NDQ3NQ==","user":{"login":"srittau","id":52799,"node_id":"MDQ6VXNlcjUyNzk5","avatar_url":"https://avatars3.githubusercontent.com/u/52799?v=4","gravatar_id":"","url":"https://api.github.com/users/srittau","html_url":"https://github.com/srittau","followers_url":"https://api.github.com/users/srittau/followers","following_url":"https://api.github.com/users/srittau/following{/other_user}","gists_url":"https://api.github.com/users/srittau/gists{/gist_id}","starred_url":"https://api.github.com/users/srittau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srittau/subscriptions","organizations_url":"https://api.github.com/users/srittau/orgs","repos_url":"https://api.github.com/users/srittau/repos","events_url":"https://api.github.com/users/srittau/events{/privacy}","received_events_url":"https://api.github.com/users/srittau/received_events","type":"User","site_admin":false},"created_at":"2018-11-19T11:38:18Z","updated_at":"2018-11-19T11:38:18Z","author_association":"COLLABORATOR","body":"We have basically three options here:\r\n\r\n* Return `Union[Message, EmailMessage]`. This does not really improve the situation, since an `isinstance()` is still necessary when `EmailMessage` is returned.\r\n* Return just `EmailMessage`. This can give false positives, but this is probably preferable to false negatives.\r\n* Return `Any`. In this case we lose all advantages of type checking.\r\n\r\nPersonally, I prefer the second option."}}
{"actor":{"display_login":"srittau"}}