Correct return type BufferedFile.read in paramiko (#4994)

According to the docs in paramiko the return type will always be bytes
``` 
.. note::
            ``'b'`` mode flag is ignored (``self.FLAG_BINARY`` in
            ``self._flags``), because SSH treats all files as binary, since we
            have no idea what encoding the file is in, or even if the file is
            text data.

        :param int size: maximum number of bytes to read
        :returns:
            data read from the file (as bytes), or an empty string if EOF was
            encountered immediately
```
This commit is contained in:
Steve B
2021-02-01 14:28:22 +01:00
committed by GitHub
parent 274f6b5d51
commit 243472c9fd

View File

@@ -26,7 +26,7 @@ class BufferedFile(ClosingContextManager, Generic[AnyStr]):
def writable(self) -> bool: ...
def seekable(self) -> bool: ...
def readinto(self, buff: bytearray) -> int: ...
def read(self, size: Optional[int] = ...) -> AnyStr: ...
def read(self, size: Optional[int] = ...) -> bytes: ...
def readline(self, size: Optional[int] = ...) -> AnyStr: ...
def readlines(self, sizehint: Optional[int] = ...) -> List[AnyStr]: ...
def seek(self, offset: int, whence: int = ...) -> None: ...