Files
typeshed/stdlib/3
Phil Jones f6decefd02 Fix email typing errors (#288)
* Change (Py3) email message payload type

The docstring of the Message get_payload method indicates that the
possible return types include None and bytes. Additionally the
set_payload method accepts bytes. Therefore I've changed the
PayloadType to include bytes and the get_payload return type to be an
Optional PayloadType.

* Change email (Py3) message_from_file IO types

Instead of using TextIO and BinaryIO use IO[str] and IO[bytes]
respectively to match the type returned by the open builtin. This
follows the recommendations in #283.

The error that prompts this is reproduced via:
```
from email import message_from_file

with open('email') as file_:
    email = message_from_file(file_)
```
Argument 1 to "message_from_file" has incompatible type IO[Any]; expected "TextIO"
2016-06-11 10:43:08 -07:00
..
2016-04-11 00:27:58 -04:00
2016-04-11 00:27:58 -04:00
2016-06-11 10:43:08 -07:00
2016-06-05 16:55:51 -07:00
2016-05-07 13:22:16 -07:00
2016-06-02 10:16:01 -07:00
2016-06-02 09:22:29 -07:00
2016-04-11 00:27:58 -04:00
2016-05-05 11:32:06 +01:00
2016-04-11 00:27:58 -04:00
2016-04-11 00:27:58 -04:00
2016-05-01 17:48:23 -07:00
2016-04-12 16:09:07 -07:00
2016-05-04 16:54:57 -07:00
2016-03-23 08:30:39 +01:00
2016-02-22 17:44:07 -06:00
2016-03-06 09:25:49 +09:00
2016-05-17 14:32:03 +01:00
2016-05-19 14:34:38 -07:00
2016-04-11 00:27:58 -04:00
2016-04-11 00:27:58 -04:00
2016-03-10 01:28:07 +01:00
2016-05-12 16:52:36 -07:00
2016-04-11 00:27:58 -04:00
2016-01-16 16:54:47 -05:00
2016-05-03 11:48:38 -07:00
2016-04-11 00:27:58 -04:00
2016-02-25 09:41:32 +00:00
2015-12-30 21:59:56 +01:00
2016-06-02 10:08:07 -07:00
2016-05-12 14:45:23 -07:00
2016-06-06 08:52:40 -07:00
2016-01-16 16:52:01 -05:00
2015-10-01 14:53:57 -07:00
2016-04-17 19:59:47 -07:00
2016-06-10 17:27:12 -07:00
2016-05-04 16:54:57 -07:00
2016-03-06 10:03:55 +09:00