mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use _typeshed.Self with __enter__ (#5719)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import socket
|
||||
from _typeshed import Self
|
||||
from typing import Any, Callable, Match, Optional, Pattern, Sequence, Tuple, Union
|
||||
|
||||
DEBUGLEVEL: int
|
||||
@@ -109,5 +110,5 @@ class Telnet:
|
||||
def expect(
|
||||
self, list: Sequence[Union[Pattern[bytes], bytes]], timeout: Optional[float] = ...
|
||||
) -> Tuple[int, Optional[Match[bytes]], bytes]: ...
|
||||
def __enter__(self) -> Telnet: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user