Fix paramiko channel.setblocking() argument (#7758)

Add 0,1 as allowed arguments using `Literal[0,1]`
This commit is contained in:
Jovan Bebic
2022-04-30 15:15:36 -06:00
committed by GitHub
parent c6b3211afa
commit f05bfe0315

View File

@@ -2,6 +2,7 @@ from collections.abc import Callable, Mapping
from logging import Logger
from threading import Condition, Event, Lock
from typing import Any, TypeVar
from typing_extensions import Literal
from paramiko.buffered_pipe import BufferedPipe
from paramiko.file import BufferedFile
@@ -69,7 +70,7 @@ class Channel(ClosingContextManager):
def set_combine_stderr(self, combine: bool) -> bool: ...
def settimeout(self, timeout: float | None) -> None: ...
def gettimeout(self) -> float | None: ...
def setblocking(self, blocking: bool) -> None: ...
def setblocking(self, blocking: bool | Literal[0, 1]) -> None: ...
def getpeername(self) -> str: ...
def close(self) -> None: ...
def recv_ready(self) -> bool: ...