mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
use Self in async context managers (#5724)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import ssl
|
||||
import sys
|
||||
from _typeshed import FileDescriptorLike
|
||||
from _typeshed import FileDescriptorLike, Self
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from socket import AddressFamily, SocketKind, _Address, _RetAddress, socket
|
||||
from typing import IO, Any, Awaitable, Callable, Dict, Generator, List, Optional, Sequence, Tuple, TypeVar, Union, overload
|
||||
@@ -57,7 +57,7 @@ class TimerHandle(Handle):
|
||||
class AbstractServer:
|
||||
def close(self) -> None: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
async def __aenter__(self: _T) -> _T: ...
|
||||
async def __aenter__(self: Self) -> Self: ...
|
||||
async def __aexit__(self, *exc: Any) -> None: ...
|
||||
def get_loop(self) -> AbstractEventLoop: ...
|
||||
def is_serving(self) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user