mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use typing_extensions.Self in the stdlib (#9694)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Iterator, MutableMapping
|
||||
from dbm import _TFlags
|
||||
from types import TracebackType
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
__all__ = ["Shelf", "BsdDbShelf", "DbfilenameShelf", "open"]
|
||||
|
||||
@@ -23,7 +23,7 @@ class Shelf(MutableMapping[str, _VT]):
|
||||
def __setitem__(self, key: str, value: _VT) -> None: ...
|
||||
def __delitem__(self, key: str) -> None: ...
|
||||
def __contains__(self, key: str) -> bool: ... # type: ignore[override]
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user