-
Notifications
You must be signed in to change notification settings - Fork 855
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct the declarations of I/O buffers as bytes-based
* Correctly declare the parameter annotations as `BinaryIO`, because in fact it works only with byte-based buffers. * `sys.stdin.read()` is always a string, so remove the Python2-specific check. * Correct the patch in the test which incorrectly sets `sys.stdin` to a bytes buffer which it never is. * `sys.stdout.buffer` always exists, so remove the Python2-specific fallback. * Correct the patch in the test which incorrectly sets `sys.stdout` to a bytes buffer which it never is. And fix a matching mistake because this necessitated `stdout.read().decode()`.
- Loading branch information
Showing
3 changed files
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters