Per comment [here](https://github.com/python/typeshed/issues/1229#issuecomment-304932714): > open(fn, 'rb') will now return IO[bytes] while open(fn, 'r') will return IO[str] For easier to use API, it's best to change to IO[Any] to accept files opened in either modes.