mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import collections
|
||||
from typing import Any, Dict, Iterator, List, Tuple
|
||||
from typing import Any, Iterator
|
||||
|
||||
class Shelf(collections.MutableMapping[Any, Any]):
|
||||
def __init__(
|
||||
self, dict: Dict[Any, Any], protocol: int | None = ..., writeback: bool = ..., keyencoding: str = ...
|
||||
self, dict: dict[Any, Any], protocol: int | None = ..., writeback: bool = ..., keyencoding: str = ...
|
||||
) -> None: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def keys(self) -> List[Any]: ...
|
||||
def keys(self) -> list[Any]: ...
|
||||
def __len__(self) -> int: ...
|
||||
def has_key(self, key: Any) -> bool: ...
|
||||
def __contains__(self, key: Any) -> bool: ...
|
||||
@@ -22,13 +22,13 @@ class Shelf(collections.MutableMapping[Any, Any]):
|
||||
|
||||
class BsdDbShelf(Shelf):
|
||||
def __init__(
|
||||
self, dict: Dict[Any, Any], protocol: int | None = ..., writeback: bool = ..., keyencoding: str = ...
|
||||
self, dict: dict[Any, Any], protocol: int | None = ..., writeback: bool = ..., keyencoding: str = ...
|
||||
) -> None: ...
|
||||
def set_location(self, key: Any) -> Tuple[str, Any]: ...
|
||||
def next(self) -> Tuple[str, Any]: ...
|
||||
def previous(self) -> Tuple[str, Any]: ...
|
||||
def first(self) -> Tuple[str, Any]: ...
|
||||
def last(self) -> Tuple[str, Any]: ...
|
||||
def set_location(self, key: Any) -> tuple[str, Any]: ...
|
||||
def next(self) -> tuple[str, Any]: ...
|
||||
def previous(self) -> tuple[str, Any]: ...
|
||||
def first(self) -> tuple[str, Any]: ...
|
||||
def last(self) -> tuple[str, Any]: ...
|
||||
|
||||
class DbfilenameShelf(Shelf):
|
||||
def __init__(self, filename: str, flag: str = ..., protocol: int | None = ..., writeback: bool = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user