You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I throw pytype (version 2024.4.11) at this sample program, type-checking fails with
File "/Users/nathaniel/temp-2023-08-25-pytype/haha.py", line 5, in <module>: Function shutil.copyfileobj was called with the wrong arguments [wrong-arg-types]
Expected: (fsrc, fdst: _typeshed.SupportsWrite[bytes], ...)
Actually passed: (fsrc, fdst: gzip.GzipFile)
Method write of protocol _typeshed.SupportsWrite[AnyStr] has the wrong signature in gzip.GzipFile:
>> _typeshed.SupportsWrite[AnyStr] expects:
def write(self: _typeshed.SupportsWrite[_T_contra], __s: _T_contra) -> object: ...
>> gzip.GzipFile defines:
def write(self: gzip.GzipFile, data: Buffer) -> int: ...
For more details, see https://google.github.io/pytype/errors.html#wrong-arg-types
Type-checking this sample program ought pass, right?
The text was updated successfully, but these errors were encountered:
Over in this area of python.org we see the sample program
When I throw pytype (version
2024.4.11
) at this sample program, type-checking fails withType-checking this sample program ought pass, right?
The text was updated successfully, but these errors were encountered: