mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-20 00:28:28 +08:00
Improve many __(a)exit__ annotations (#9696)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from collections.abc import MutableMapping
|
||||
from types import TracebackType
|
||||
from typing import Any, NoReturn, TypeVar
|
||||
|
||||
_KT = TypeVar("_KT")
|
||||
@@ -6,7 +7,9 @@ _VT = TypeVar("_VT")
|
||||
|
||||
class RLock:
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, exc_type, exc_value, traceback): ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
class RecentlyUsedContainer(MutableMapping[_KT, _VT]):
|
||||
ContainerCls: Any
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .request import RequestMethods
|
||||
|
||||
@@ -8,7 +10,9 @@ class PoolManager(RequestMethods):
|
||||
pools: Any
|
||||
def __init__(self, num_pools=..., headers=..., **connection_pool_kw) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, exc_type, exc_val, exc_tb): ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> Literal[False]: ...
|
||||
def clear(self): ...
|
||||
def connection_from_host(self, host, port=..., scheme=...): ...
|
||||
def connection_from_url(self, url): ...
|
||||
|
||||
Reference in New Issue
Block a user