mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 08:04:24 +08:00
Third-party stubs: Improve several __exit__ methods (#7575)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import threading
|
||||
from _typeshed import Self, SupportsItems
|
||||
from datetime import datetime, timedelta
|
||||
from types import TracebackType
|
||||
from typing import Any, Callable, ClassVar, Generic, Iterable, Iterator, Mapping, Pattern, Sequence, TypeVar, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
@@ -320,7 +321,9 @@ class PubSub:
|
||||
self, connection_pool, shard_hint: Any | None = ..., ignore_subscribe_messages: bool = ..., encoder: Any | None = ...
|
||||
) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, exc_type: object, exc_value: object, traceback: object) -> None: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
def __del__(self): ...
|
||||
channels: Any
|
||||
patterns: Any
|
||||
@@ -698,6 +701,6 @@ class Monitor:
|
||||
monitor_re: Pattern[str]
|
||||
def __init__(self, connection_pool) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
def __exit__(self, *args: object) -> None: ...
|
||||
def next_command(self) -> dict[str, Any]: ...
|
||||
def listen(self) -> Iterable[dict[str, Any]]: ...
|
||||
|
||||
Reference in New Issue
Block a user