Closed
Description
The following code used to pass mypy type check with mypy 0.770
but doesn't work for mypy 0.780
import shutil
filename1 = '/foo/bar'
filename2 = '/foo/baz'
srcfp = open(filename1, 'rb')
destfp = open(filename2, 'wb')
shutil.copyfileobj(srcfp, destfp)
> mypy 0.770
$ mypy --version
mypy 0.770
$ mypy scratch.py
Success: no issues found in 1 source file
> mypy 0.780
$ mypy --version
mypy 0.780
$ scratch.py
scratch.py:9: error: Cannot infer type argument 1 of "copyfileobj"
Do let me know if this not a typeshed issue, but instead is a mypy issue.
Metadata
Metadata
Assignees
Labels
No labels