mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
* make io classes inherit from typing IO classes This makes these classes usable if type annotations are given as "IO" or "TextIO". In the future, we'll then be able to move open() to return a concrete class instead (#3951). * open: introduce concrete return types Fixes #3951. We use the values of the "mode" and "buffering" arguments to figure out the concrete type open() will return at runtime. (Compare the CPython code in https://github.com/python/cpython/blob/master/Modules/_io/_iomodule.c#L231.)