change timeouts in telnetlib to float (#5243)

This commit is contained in:
ldruschk
2021-04-23 14:21:21 +02:00
committed by GitHub
parent b91b0615bf
commit 27facc7ff9

View File

@@ -83,15 +83,15 @@ NOOPT: bytes
class Telnet:
host: Optional[str] # undocumented
def __init__(self, host: Optional[str] = ..., port: int = ..., timeout: int = ...) -> None: ...
def open(self, host: str, port: int = ..., timeout: int = ...) -> None: ...
def __init__(self, host: Optional[str] = ..., port: int = ..., timeout: float = ...) -> None: ...
def open(self, host: str, port: int = ..., timeout: float = ...) -> None: ...
def msg(self, msg: str, *args: Any) -> None: ...
def set_debuglevel(self, debuglevel: int) -> None: ...
def close(self) -> None: ...
def get_socket(self) -> socket.socket: ...
def fileno(self) -> int: ...
def write(self, buffer: bytes) -> None: ...
def read_until(self, match: bytes, timeout: Optional[int] = ...) -> bytes: ...
def read_until(self, match: bytes, timeout: Optional[float] = ...) -> bytes: ...
def read_all(self) -> bytes: ...
def read_some(self) -> bytes: ...
def read_very_eager(self) -> bytes: ...
@@ -108,7 +108,7 @@ class Telnet:
def mt_interact(self) -> None: ...
def listener(self) -> None: ...
def expect(
self, list: Sequence[Union[Pattern[bytes], bytes]], timeout: Optional[int] = ...
self, list: Sequence[Union[Pattern[bytes], bytes]], timeout: Optional[float] = ...
) -> Tuple[int, Optional[Match[bytes]], bytes]: ...
if sys.version_info >= (3, 6):
def __enter__(self) -> Telnet: ...