mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Use _typeshed.Self with __enter__ (#5717)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import sys
|
||||
import types
|
||||
from _typeshed import Self
|
||||
from socket import socket as _socket
|
||||
from typing import Any, BinaryIO, Callable, ClassVar, Optional, Set, Tuple, Type, TypeVar, Union
|
||||
|
||||
@@ -30,7 +31,7 @@ class BaseServer:
|
||||
def server_activate(self) -> None: ...
|
||||
def server_bind(self) -> None: ...
|
||||
def verify_request(self, request: _RequestType, client_address: _AddressType) -> bool: ...
|
||||
def __enter__(self: _T) -> _T: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[types.TracebackType]
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user