mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Switch to PEP-604 syntax in python2 stubs (#5915)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import socket
|
||||
from typing import Any, Callable, Match, Optional, Pattern, Sequence, Tuple, Union
|
||||
from typing import Any, Callable, Match, Pattern, Sequence, Tuple
|
||||
|
||||
DEBUGLEVEL: int
|
||||
TELNET_PORT: int
|
||||
@@ -81,8 +81,8 @@ EXOPL: bytes
|
||||
NOOPT: bytes
|
||||
|
||||
class Telnet:
|
||||
host: Optional[str] # undocumented
|
||||
def __init__(self, host: Optional[str] = ..., port: int = ..., timeout: float = ...) -> None: ...
|
||||
host: str | None # undocumented
|
||||
def __init__(self, host: str | None = ..., 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: ...
|
||||
@@ -90,7 +90,7 @@ class Telnet:
|
||||
def get_socket(self) -> socket.socket: ...
|
||||
def fileno(self) -> int: ...
|
||||
def write(self, buffer: bytes) -> None: ...
|
||||
def read_until(self, match: bytes, timeout: Optional[float] = ...) -> bytes: ...
|
||||
def read_until(self, match: bytes, timeout: float | None = ...) -> bytes: ...
|
||||
def read_all(self) -> bytes: ...
|
||||
def read_some(self) -> bytes: ...
|
||||
def read_very_eager(self) -> bytes: ...
|
||||
@@ -98,7 +98,7 @@ class Telnet:
|
||||
def read_lazy(self) -> bytes: ...
|
||||
def read_very_lazy(self) -> bytes: ...
|
||||
def read_sb_data(self) -> bytes: ...
|
||||
def set_option_negotiation_callback(self, callback: Optional[Callable[[socket.socket, bytes, bytes], Any]]) -> None: ...
|
||||
def set_option_negotiation_callback(self, callback: Callable[[socket.socket, bytes, bytes], Any] | None) -> None: ...
|
||||
def process_rawq(self) -> None: ...
|
||||
def rawq_getchar(self) -> bytes: ...
|
||||
def fill_rawq(self) -> None: ...
|
||||
@@ -107,5 +107,5 @@ class Telnet:
|
||||
def mt_interact(self) -> None: ...
|
||||
def listener(self) -> None: ...
|
||||
def expect(
|
||||
self, list: Sequence[Union[Pattern[bytes], bytes]], timeout: Optional[float] = ...
|
||||
) -> Tuple[int, Optional[Match[bytes]], bytes]: ...
|
||||
self, list: Sequence[Pattern[bytes] | bytes], timeout: float | None = ...
|
||||
) -> Tuple[int, Match[bytes] | None, bytes]: ...
|
||||
|
||||
Reference in New Issue
Block a user