Skip to content

Commit f05bfe0

Browse files
authored
Fix paramiko channel.setblocking() argument (#7758)
Add 0,1 as allowed arguments using `Literal[0,1]`
1 parent c6b3211 commit f05bfe0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stubs/paramiko/paramiko/channel.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ from collections.abc import Callable, Mapping
22
from logging import Logger
33
from threading import Condition, Event, Lock
44
from typing import Any, TypeVar
5+
from typing_extensions import Literal
56

67
from paramiko.buffered_pipe import BufferedPipe
78
from paramiko.file import BufferedFile
@@ -69,7 +70,7 @@ class Channel(ClosingContextManager):
6970
def set_combine_stderr(self, combine: bool) -> bool: ...
7071
def settimeout(self, timeout: float | None) -> None: ...
7172
def gettimeout(self) -> float | None: ...
72-
def setblocking(self, blocking: bool) -> None: ...
73+
def setblocking(self, blocking: bool | Literal[0, 1]) -> None: ...
7374
def getpeername(self) -> str: ...
7475
def close(self) -> None: ...
7576
def recv_ready(self) -> bool: ...

0 commit comments

Comments
 (0)