massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / paramiko / paramiko / channel.pyi
1 from logging import Logger
2 from threading import Condition, Event, Lock
3 from typing import Any, Callable, Mapping, TypeVar
4
5 from paramiko.buffered_pipe import BufferedPipe
6 from paramiko.file import BufferedFile
7 from paramiko.transport import Transport
8 from paramiko.util import ClosingContextManager
9
10 _F = TypeVar("_F", bound=Callable[..., Any])
11
12 def open_only(func: _F) -> Callable[[_F], _F]: ...
13
14 class Channel(ClosingContextManager):
15     chanid: int
16     remote_chanid: int
17     transport: Transport | None
18     active: bool
19     eof_received: int
20     eof_sent: int
21     in_buffer: BufferedPipe[Any]
22     in_stderr_buffer: BufferedPipe[Any]
23     timeout: float | None
24     closed: bool
25     ultra_debug: bool
26     lock: Lock
27     out_buffer_cv: Condition
28     in_window_size: int
29     out_window_size: int
30     in_max_packet_size: int
31     out_max_packet_size: int
32     in_window_threshold: int
33     in_window_sofar: int
34     status_event: Event
35     logger: Logger
36     event: Event
37     event_ready: bool
38     combine_stderr: bool
39     exit_status: int
40     origin_addr: None
41     def __init__(self, chanid: int) -> None: ...
42     def __del__(self) -> None: ...
43     def get_pty(
44         self, term: str = ..., width: int = ..., height: int = ..., width_pixels: int = ..., height_pixels: int = ...
45     ) -> None: ...
46     def invoke_shell(self) -> None: ...
47     def exec_command(self, command: str) -> None: ...
48     def invoke_subsystem(self, subsystem: str) -> None: ...
49     def resize_pty(self, width: int = ..., height: int = ..., width_pixels: int = ..., height_pixels: int = ...) -> None: ...
50     def update_environment(self, environment: Mapping[str, str]) -> None: ...
51     def set_environment_variable(self, name: str, value: str) -> None: ...
52     def exit_status_ready(self) -> bool: ...
53     def recv_exit_status(self) -> int: ...
54     def send_exit_status(self, status: int) -> None: ...
55     def request_x11(
56         self,
57         screen_number: int = ...,
58         auth_protocol: str | None = ...,
59         auth_cookie: str | None = ...,
60         single_connection: bool = ...,
61         handler: Callable[[Channel, tuple[str, int]], None] | None = ...,
62     ) -> bytes: ...
63     def request_forward_agent(self, handler: Callable[[Channel], None]) -> bool: ...
64     def get_transport(self) -> Transport: ...
65     def set_name(self, name: str) -> None: ...
66     def get_name(self) -> str: ...
67     def get_id(self) -> int: ...
68     def set_combine_stderr(self, combine: bool) -> bool: ...
69     def settimeout(self, timeout: float | None) -> None: ...
70     def gettimeout(self) -> float | None: ...
71     def setblocking(self, blocking: bool) -> None: ...
72     def getpeername(self) -> str: ...
73     def close(self) -> None: ...
74     def recv_ready(self) -> bool: ...
75     def recv(self, nbytes: int) -> bytes: ...
76     def recv_stderr_ready(self) -> bool: ...
77     def recv_stderr(self, nbytes: int) -> bytes: ...
78     def send_ready(self) -> bool: ...
79     def send(self, s: bytes) -> int: ...
80     def send_stderr(self, s: bytes) -> int: ...
81     def sendall(self, s: bytes) -> None: ...
82     def sendall_stderr(self, s: bytes) -> None: ...
83     def makefile(self, *params: Any) -> ChannelFile: ...
84     def makefile_stderr(self, *params: Any) -> ChannelStderrFile: ...
85     def makefile_stdin(self, *params: Any) -> ChannelStdinFile: ...
86     def fileno(self) -> int: ...
87     def shutdown(self, how: int) -> None: ...
88     def shutdown_read(self) -> None: ...
89     def shutdown_write(self) -> None: ...
90
91 class ChannelFile(BufferedFile[Any]):
92     channel: Channel
93     def __init__(self, channel: Channel, mode: str = ..., bufsize: int = ...) -> None: ...
94
95 class ChannelStderrFile(ChannelFile): ...
96
97 class ChannelStdinFile(ChannelFile):
98     def close(self) -> None: ...