mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Use _typeshed.Self where __enter__ returns self (#5698)
This commit is contained in:
committed by
GitHub
parent
1fb100dca4
commit
58559e56b3
@@ -1,4 +1,5 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from types import TracebackType
|
||||
from typing import Callable, Optional, Protocol, Tuple, Type
|
||||
|
||||
@@ -18,7 +19,7 @@ class PipeHandle:
|
||||
def __del__(self, _warn: _WarnFunction = ...) -> None: ...
|
||||
else:
|
||||
def __del__(self) -> None: ...
|
||||
def __enter__(self) -> PipeHandle: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, t: Optional[type], v: Optional[BaseException], tb: Optional[TracebackType]) -> None: ...
|
||||
@property
|
||||
def handle(self) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user