Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stubs/paramiko/paramiko/buffered_pipe.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class BufferedPipe(Generic[AnyStr]):
def set_event(self, event: Event) -> None: ...
def feed(self, data: AnyStr) -> None: ...
def read_ready(self) -> bool: ...
def read(self, nbytes: int, timeout: float | None = None) -> AnyStr: ...
def empty(self) -> AnyStr: ...
def read(self, nbytes: int, timeout: float | None = None) -> bytes: ...
def empty(self) -> bytes: ...
def close(self) -> None: ...
def __len__(self) -> int: ...
2 changes: 1 addition & 1 deletion stubs/paramiko/paramiko/channel.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Channel(ClosingContextManager):
def settimeout(self, timeout: float | None) -> None: ...
def gettimeout(self) -> float | None: ...
def setblocking(self, blocking: bool | Literal[0, 1]) -> None: ...
def getpeername(self) -> str: ...
def getpeername(self) -> tuple[str, int]: ...
def close(self) -> None: ...
def recv_ready(self) -> bool: ...
def recv(self, nbytes: int) -> bytes: ...
Expand Down
7 changes: 4 additions & 3 deletions stubs/paramiko/paramiko/file.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from collections.abc import Iterable
from typing import Any, AnyStr, Generic
from typing import AnyStr, Generic
from typing_extensions import Self

from paramiko.util import ClosingContextManager

Expand All @@ -19,7 +20,7 @@ class BufferedFile(ClosingContextManager, Generic[AnyStr]):
newlines: AnyStr | tuple[AnyStr, ...] | None
def __init__(self) -> None: ...
def __del__(self) -> None: ...
def __iter__(self) -> BufferedFile[Any]: ...
def __iter__(self) -> Self: ...
def close(self) -> None: ...
def flush(self) -> None: ...
def __next__(self) -> AnyStr: ...
Expand All @@ -34,6 +35,6 @@ class BufferedFile(ClosingContextManager, Generic[AnyStr]):
def tell(self) -> int: ...
def write(self, data: AnyStr) -> None: ...
def writelines(self, sequence: Iterable[AnyStr]) -> None: ...
def xreadlines(self) -> BufferedFile[Any]: ...
def xreadlines(self) -> Self: ...
@property
def closed(self) -> bool: ...
2 changes: 1 addition & 1 deletion stubs/paramiko/paramiko/proxy.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ class ProxyCommand(ClosingContextManager):
def close(self) -> None: ...
@property
def closed(self) -> bool: ...
def settimeout(self, timeout: float) -> None: ...
def settimeout(self, timeout: float | None) -> None: ...
4 changes: 2 additions & 2 deletions stubs/paramiko/paramiko/sftp_client.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class SFTPClient(BaseSFTP, ClosingContextManager):
def from_transport(cls, t: Transport, window_size: int | None = None, max_packet_size: int | None = None) -> Self | None: ...
def close(self) -> None: ...
def get_channel(self) -> Channel | None: ...
def listdir(self, path: str = ".") -> list[str]: ...
def listdir_attr(self, path: str = ".") -> list[SFTPAttributes]: ...
def listdir(self, path: bytes | str = ".") -> list[str]: ...
def listdir_attr(self, path: bytes | str = ".") -> list[SFTPAttributes]: ...
def listdir_iter(self, path: bytes | str = ".", read_aheads: int = 50) -> Iterator[SFTPAttributes]: ...
def open(self, filename: bytes | str, mode: str = "r", bufsize: int = -1) -> SFTPFile: ...
file = open
Expand Down
4 changes: 2 additions & 2 deletions stubs/paramiko/paramiko/sftp_file.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class SFTPFile(BufferedFile[Any]):
def __init__(self, sftp: SFTPClient, handle: _LikeBytes, mode: str = "r", bufsize: int = -1) -> None: ...
def __del__(self) -> None: ...
def close(self) -> None: ...
def settimeout(self, timeout: float) -> None: ...
def gettimeout(self) -> float: ...
def settimeout(self, timeout: float | None) -> None: ...
def gettimeout(self) -> float | None: ...
def setblocking(self, blocking: bool) -> None: ...
def seekable(self) -> bool: ...
def seek(self, offset: int, whence: int = 0) -> None: ...
Expand Down
Loading