mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Use _typeshed.Self with __enter__ (#5717)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import email.message
|
||||
import sys
|
||||
from _typeshed import StrOrBytesPath
|
||||
from _typeshed import Self, StrOrBytesPath
|
||||
from types import TracebackType
|
||||
from typing import (
|
||||
IO,
|
||||
@@ -189,7 +189,7 @@ class _ProxyFile(Generic[AnyStr]):
|
||||
def tell(self) -> int: ...
|
||||
def seek(self, offset: int, whence: int = ...) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self) -> _ProxyFile[AnyStr]: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: Optional[Type[BaseException]], exc: Optional[BaseException], tb: Optional[TracebackType]
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user