Closed
Description
Bug Report
This code
import io
bf = open('binary.file', 'wb', buffering=0)
print(isinstance(bf, io.RawIOBase)) # > True
bw = io.BufferedWriter(bf)
throws:
test.py:5: error: Argument 1 to "BufferedWriter" has incompatible type "BinaryIO"; expected "RawIOBase"
Your Environment
- Mypy version used: 0.812
- Mypy command-line flags:
- Mypy configuration options from
mypy.ini
(and other config files): - Python version used: 3.6.9
- Operating system and version: Ubuntu 18.04