From 56c45528b7e7e801b6de0b97b4b06312fded8c74 Mon Sep 17 00:00:00 2001 From: Manfred Kaiser <37737811+manfred-kaiser@users.noreply.github.com> Date: Sat, 4 Dec 2021 17:31:27 +0100 Subject: [PATCH] paramiko.Channel - mark arguments as also accepting bytes (#6276) --- stubs/paramiko/paramiko/channel.pyi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/stubs/paramiko/paramiko/channel.pyi b/stubs/paramiko/paramiko/channel.pyi index 6399e4de9..1870c9e1f 100644 --- a/stubs/paramiko/paramiko/channel.pyi +++ b/stubs/paramiko/paramiko/channel.pyi @@ -41,22 +41,22 @@ class Channel(ClosingContextManager): def __init__(self, chanid: int) -> None: ... def __del__(self) -> None: ... def get_pty( - self, term: str = ..., width: int = ..., height: int = ..., width_pixels: int = ..., height_pixels: int = ... + self, term: str | bytes = ..., width: int = ..., height: int = ..., width_pixels: int = ..., height_pixels: int = ... ) -> None: ... def invoke_shell(self) -> None: ... - def exec_command(self, command: str) -> None: ... - def invoke_subsystem(self, subsystem: str) -> None: ... + def exec_command(self, command: str | bytes) -> None: ... + def invoke_subsystem(self, subsystem: str | bytes) -> None: ... def resize_pty(self, width: int = ..., height: int = ..., width_pixels: int = ..., height_pixels: int = ...) -> None: ... - def update_environment(self, environment: Mapping[str, str]) -> None: ... - def set_environment_variable(self, name: str, value: str) -> None: ... + def update_environment(self, environment: Mapping[str | bytes, str | bytes]) -> None: ... + def set_environment_variable(self, name: str | bytes, value: str | bytes) -> None: ... def exit_status_ready(self) -> bool: ... def recv_exit_status(self) -> int: ... def send_exit_status(self, status: int) -> None: ... def request_x11( self, screen_number: int = ..., - auth_protocol: str | None = ..., - auth_cookie: str | None = ..., + auth_protocol: str | bytes | None = ..., + auth_cookie: str | bytes | None = ..., single_connection: bool = ..., handler: Callable[[Channel, tuple[str, int]], None] | None = ..., ) -> bytes: ...