mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-22 11:51:28 +08:00
Add default values for third-party stubs beginning with 'P' (#9957)
This commit is contained in:
@@ -29,7 +29,7 @@ class CnOpts:
|
||||
compression: bool = ...
|
||||
ciphers: Sequence[str] | None = ...
|
||||
hostkeys: paramiko.HostKeys | None = ...
|
||||
def __init__(self, knownhosts: str | None = ...) -> None: ...
|
||||
def __init__(self, knownhosts: str | None = None) -> None: ...
|
||||
def get_hostkey(self, host: str) -> paramiko.PKey: ...
|
||||
|
||||
_Callback: TypeAlias = Callable[[int, int], object]
|
||||
@@ -39,56 +39,56 @@ class Connection:
|
||||
def __init__(
|
||||
self,
|
||||
host: str,
|
||||
username: str | None = ...,
|
||||
private_key: str | paramiko.RSAKey | paramiko.AgentKey | None = ...,
|
||||
password: str | None = ...,
|
||||
port: int = ...,
|
||||
private_key_pass: str | None = ...,
|
||||
ciphers: Sequence[str] | None = ...,
|
||||
log: bool = ...,
|
||||
cnopts: CnOpts | None = ...,
|
||||
default_path: _Path | None = ...,
|
||||
username: str | None = None,
|
||||
private_key: str | paramiko.RSAKey | paramiko.AgentKey | None = None,
|
||||
password: str | None = None,
|
||||
port: int = 22,
|
||||
private_key_pass: str | None = None,
|
||||
ciphers: Sequence[str] | None = None,
|
||||
log: bool = False,
|
||||
cnopts: CnOpts | None = None,
|
||||
default_path: _Path | None = None,
|
||||
) -> None: ...
|
||||
@property
|
||||
def pwd(self) -> str: ...
|
||||
def get(
|
||||
self, remotepath: _Path, localpath: _Path | None = ..., callback: _Callback | None = ..., preserve_mtime: bool = ...
|
||||
self, remotepath: _Path, localpath: _Path | None = None, callback: _Callback | None = None, preserve_mtime: bool = False
|
||||
) -> None: ...
|
||||
def get_d(self, remotedir: _Path, localdir: _Path, preserve_mtime: bool = ...) -> None: ...
|
||||
def get_r(self, remotedir: _Path, localdir: _Path, preserve_mtime: bool = ...) -> None: ...
|
||||
def getfo(self, remotepath: _Path, flo: IO[bytes], callback: _Callback | None = ...) -> int: ...
|
||||
def get_d(self, remotedir: _Path, localdir: _Path, preserve_mtime: bool = False) -> None: ...
|
||||
def get_r(self, remotedir: _Path, localdir: _Path, preserve_mtime: bool = False) -> None: ...
|
||||
def getfo(self, remotepath: _Path, flo: IO[bytes], callback: _Callback | None = None) -> int: ...
|
||||
def put(
|
||||
self,
|
||||
localpath: _Path,
|
||||
remotepath: _Path | None = ...,
|
||||
callback: _Callback | None = ...,
|
||||
confirm: bool = ...,
|
||||
preserve_mtime: bool = ...,
|
||||
remotepath: _Path | None = None,
|
||||
callback: _Callback | None = None,
|
||||
confirm: bool = True,
|
||||
preserve_mtime: bool = False,
|
||||
) -> paramiko.SFTPAttributes: ...
|
||||
def put_d(self, localpath: _Path, remotepath: _Path, confirm: bool = ..., preserve_mtime: bool = ...) -> None: ...
|
||||
def put_r(self, localpath: _Path, remotepath: _Path, confirm: bool = ..., preserve_mtime: bool = ...) -> None: ...
|
||||
def put_d(self, localpath: _Path, remotepath: _Path, confirm: bool = True, preserve_mtime: bool = False) -> None: ...
|
||||
def put_r(self, localpath: _Path, remotepath: _Path, confirm: bool = True, preserve_mtime: bool = False) -> None: ...
|
||||
def putfo(
|
||||
self,
|
||||
flo: IO[bytes],
|
||||
remotepath: _Path | None = ...,
|
||||
file_size: int = ...,
|
||||
callback: _Callback | None = ...,
|
||||
confirm: bool = ...,
|
||||
remotepath: _Path | None = None,
|
||||
file_size: int = 0,
|
||||
callback: _Callback | None = None,
|
||||
confirm: bool = True,
|
||||
) -> paramiko.SFTPAttributes: ...
|
||||
def execute(self, command: str) -> list[str]: ...
|
||||
def cd(self, remotepath: _Path | None = ...) -> AbstractContextManager[None]: ... # noqa: F811
|
||||
def cd(self, remotepath: _Path | None = None) -> AbstractContextManager[None]: ... # noqa: F811
|
||||
def chdir(self, remotepath: _Path) -> None: ...
|
||||
def cwd(self, remotepath: _Path) -> None: ...
|
||||
def chmod(self, remotepath: _Path, mode: int = ...) -> None: ...
|
||||
def chown(self, remotepath: _Path, uid: int | None = ..., gid: int | None = ...) -> None: ...
|
||||
def chmod(self, remotepath: _Path, mode: int = 777) -> None: ...
|
||||
def chown(self, remotepath: _Path, uid: int | None = None, gid: int | None = None) -> None: ...
|
||||
def getcwd(self) -> str: ...
|
||||
def listdir(self, remotepath: _Path = ...) -> list[str]: ...
|
||||
def listdir_attr(self, remotepath: _Path = ...) -> list[paramiko.SFTPAttributes]: ...
|
||||
def mkdir(self, remotepath: _Path, mode: int = ...) -> None: ...
|
||||
def listdir(self, remotepath: _Path = ".") -> list[str]: ...
|
||||
def listdir_attr(self, remotepath: _Path = ".") -> list[paramiko.SFTPAttributes]: ...
|
||||
def mkdir(self, remotepath: _Path, mode: int = 777) -> None: ...
|
||||
def normalize(self, remotepath: _Path) -> str: ...
|
||||
def isdir(self, remotepath: _Path) -> bool: ...
|
||||
def isfile(self, remotepath: _Path) -> bool: ...
|
||||
def makedirs(self, remotedir: _Path, mode: int = ...) -> None: ...
|
||||
def makedirs(self, remotedir: _Path, mode: int = 777) -> None: ...
|
||||
def readlink(self, remotelink: _Path) -> str: ...
|
||||
def remove(self, remotefile: _Path) -> None: ...
|
||||
def unlink(self, remotefile: _Path) -> None: ...
|
||||
@@ -97,13 +97,18 @@ class Connection:
|
||||
def stat(self, remotepath: _Path) -> paramiko.SFTPAttributes: ...
|
||||
def lstat(self, remotepath: _Path) -> paramiko.SFTPAttributes: ...
|
||||
def close(self) -> None: ...
|
||||
def open(self, remote_file: _Path, mode: str = ..., bufsize: int = ...) -> paramiko.SFTPFile: ...
|
||||
def open(self, remote_file: _Path, mode: str = "r", bufsize: int = -1) -> paramiko.SFTPFile: ...
|
||||
def exists(self, remotepath: _Path) -> bool: ...
|
||||
def lexists(self, remotepath: _Path) -> bool: ...
|
||||
def symlink(self, remote_src: _Path, remote_dest: _Path) -> None: ...
|
||||
def truncate(self, remotepath: _Path, size: int) -> int: ...
|
||||
def walktree( # noqa: F811
|
||||
self, remotepath: _Path, fcallback: _PathCallback, dcallback: _PathCallback, ucallback: _PathCallback, recurse: bool = ...
|
||||
self,
|
||||
remotepath: _Path,
|
||||
fcallback: _PathCallback,
|
||||
dcallback: _PathCallback,
|
||||
ucallback: _PathCallback,
|
||||
recurse: bool = True,
|
||||
) -> None: ...
|
||||
@property
|
||||
def sftp_client(self) -> paramiko.SFTPClient: ...
|
||||
|
||||
@@ -30,6 +30,6 @@ def reparent(newparent: str, oldpath: str) -> str: ...
|
||||
_PathCallback: TypeAlias = Callable[[str], object]
|
||||
|
||||
def walktree(
|
||||
localpath: str, fcallback: _PathCallback, dcallback: _PathCallback, ucallback: _PathCallback, recurse: bool = ...
|
||||
localpath: str, fcallback: _PathCallback, dcallback: _PathCallback, ucallback: _PathCallback, recurse: bool = True
|
||||
) -> None: ...
|
||||
def cd(localpath: str | None = ...) -> AbstractContextManager[None]: ...
|
||||
def cd(localpath: str | None = None) -> AbstractContextManager[None]: ...
|
||||
|
||||
Reference in New Issue
Block a user