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:
@@ -7,6 +7,7 @@ from _typeshed import (
|
||||
OpenBinaryModeWriting,
|
||||
OpenTextMode,
|
||||
ReadableBuffer,
|
||||
Self,
|
||||
StrOrBytesPath,
|
||||
SupportsDivMod,
|
||||
SupportsKeysAndGetItem,
|
||||
@@ -648,7 +649,7 @@ class memoryview(Sized, Sequence[int]):
|
||||
contiguous: bool
|
||||
nbytes: int
|
||||
def __init__(self, obj: ReadableBuffer) -> None: ...
|
||||
def __enter__(self) -> memoryview: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user