mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-09 04:52:23 +08:00
Improve many __(a)exit__ annotations (#9696)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import datetime
|
||||
from _typeshed import Unused
|
||||
from collections.abc import Callable, Iterator
|
||||
from json import JSONDecoder
|
||||
from typing import Any
|
||||
@@ -107,7 +108,7 @@ class Response:
|
||||
def __nonzero__(self) -> bool: ...
|
||||
def __iter__(self) -> Iterator[bytes]: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: object) -> None: ...
|
||||
def __exit__(self, *args: Unused) -> None: ...
|
||||
@property
|
||||
def next(self) -> PreparedRequest | None: ...
|
||||
@property
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete, SupportsItems, SupportsRead
|
||||
from _typeshed import Incomplete, SupportsItems, SupportsRead, Unused
|
||||
from collections.abc import Callable, Iterable, Mapping, MutableMapping
|
||||
from typing import Any
|
||||
from typing_extensions import Self, TypeAlias, TypedDict
|
||||
@@ -134,7 +134,7 @@ class Session(SessionRedirectMixin):
|
||||
redirect_cache: RecentlyUsedContainer[Any, Any]
|
||||
def __init__(self) -> None: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args) -> None: ...
|
||||
def __exit__(self, *args: Unused) -> None: ...
|
||||
def prepare_request(self, request: Request) -> PreparedRequest: ...
|
||||
def request(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user