mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 14:01:55 +08:00
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:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user