-
-
Couldn't load subscription status.
- Fork 1.9k
Open
Labels
topic: ioI/O related issuesI/O related issues
Description
contextlib.redirect_stdout and contextlib.redirect_stderr according to typeshed right now, require a parameter of typing.IO[str]
If I make a class that inherits IO[str], it requires implementing other methods that aren't really needed.
In practice, write and flush alone have worked for me in multiple projects for a long time.
What do we think of using a Protocol with just write and flush, instead of IO[str]?
Metadata
Metadata
Assignees
Labels
topic: ioI/O related issuesI/O related issues