mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Backport many Self-related changes to the Python-2 stdlib (#7128)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import collections
|
||||
from _typeshed import Self
|
||||
from typing import Any, Iterator
|
||||
|
||||
class Shelf(collections.MutableMapping[Any, Any]):
|
||||
@@ -14,7 +15,7 @@ class Shelf(collections.MutableMapping[Any, Any]):
|
||||
def __getitem__(self, key: Any) -> Any: ...
|
||||
def __setitem__(self, key: Any, value: Any) -> None: ...
|
||||
def __delitem__(self, key: Any) -> None: ...
|
||||
def __enter__(self) -> Shelf: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __del__(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user