python-trio / trio-typing

Type hints for Trio and related projects
Other
27 stars 13 forks source link

Revamp file I/O stubs to better match stdlib #47

Closed oremanj closed 2 years ago

oremanj commented 2 years ago

We now have:

The updated logic here also allows inferring the return type of open_file(), wrap_file(), and Path.open() using literal types rather than a plugin, which fixes #28 and provides a better experience for non-mypy users.