a better definition for io.IOBase#1160
Conversation
|
But it doesn't seem to work. When I check the above example with mypy I still get errors: import gzip, shutil
shutil.copyfileobj(gzip.GzipFile("/tmp/test.txt.gz", "r"),
gzip.GzipFile("/tmp/test.txt.gz", "w"))and That's a different error than before but still an error. :-( |
|
(It's actually worse because you get this error on any instantiation of GzipFile.) |
This solves the issue with instantiating gzip.GzipFile() mentioned at #1160 (comment)
This solves the issue with instantiating gzip.GzipFile() mentioned at #1160 (comment)
|
Oops, missed this yesterday. Right, mypy's version of In any case, sorry for breaking this! I was testing with pytype's typing.pyi (https://github.com/google/pytype/blob/master/pytype/pytd/builtins/typing.pytd) which looks slightly different. |
|
Well, the |
This is aiming to make the following code pass type checking: