mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
stdlib: Improve a bunch of __(a)exit__ methods (#7571)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import socket
|
||||
from _typeshed import Self
|
||||
from types import TracebackType
|
||||
from typing import Any, Callable, Match, Pattern, Sequence
|
||||
|
||||
__all__ = ["Telnet"]
|
||||
@@ -113,4 +114,6 @@ class Telnet:
|
||||
self, list: Sequence[Pattern[bytes] | bytes], timeout: float | None = ...
|
||||
) -> tuple[int, Match[bytes] | None, bytes]: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ...
|
||||
def __exit__(
|
||||
self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user