mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-19 02:15: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 collections.abc
|
||||
from _typeshed import Self
|
||||
from typing import Any, Dict, Iterator, Optional, Tuple
|
||||
|
||||
class Shelf(collections.abc.MutableMapping[Any, Any]):
|
||||
@@ -12,7 +13,7 @@ class Shelf(collections.abc.MutableMapping[Any, Any]):
|
||||
def __getitem__(self, key: str) -> Any: ...
|
||||
def __setitem__(self, key: str, value: Any) -> None: ...
|
||||
def __delitem__(self, key: str) -> 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