Closed
Description
sftp_client = paramiko.SFTPClient.from_transport(...)
out_gz = sftp_client.file(filename)
out = gzip.GzipFile(fileobj=out_gz, filename=filename)
^
Argument of type "SFTPFile" cannot be assigned to parameter "fileobj" of type "IO[bytes] | None" in function "__init__"
Type "SFTPFile" cannot be assigned to type "IO[bytes] | None"
"SFTPFile" is incompatible with "IO[bytes]"
Cannot assign to "None"
It seems like it should be compatible. Should I cast here? Any thoughts?