mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Use _typeshed.Self with __enter__ (#5712)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from types import TracebackType
|
||||
from typing import (
|
||||
IO,
|
||||
@@ -80,7 +81,7 @@ class ExitStack(ContextManager[ExitStack]):
|
||||
def callback(self, callback: Callable[..., Any], *args: Any, **kwds: Any) -> Callable[..., Any]: ...
|
||||
def pop_all(self: _U) -> _U: ...
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self: _U) -> _U: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self,
|
||||
__exc_type: Optional[Type[BaseException]],
|
||||
|
||||
Reference in New Issue
Block a user