Closed
Description
(This was originally filed as python/typeshed#4201, but it was suggested
to file here instead)
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"
Metadata
Metadata
Assignees
Labels
No labels