mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Switch to PEP-604 syntax in python2 stubs (#5915)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import collections
|
||||
from typing import Any, Dict, Iterator, List, Optional, Tuple
|
||||
from typing import Any, Dict, Iterator, List, Tuple
|
||||
|
||||
class Shelf(collections.MutableMapping[Any, Any]):
|
||||
def __init__(
|
||||
self, dict: Dict[Any, Any], protocol: Optional[int] = ..., 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]: ...
|
||||
@@ -22,7 +22,7 @@ class Shelf(collections.MutableMapping[Any, Any]):
|
||||
|
||||
class BsdDbShelf(Shelf):
|
||||
def __init__(
|
||||
self, dict: Dict[Any, Any], protocol: Optional[int] = ..., 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]: ...
|
||||
@@ -31,6 +31,6 @@ class BsdDbShelf(Shelf):
|
||||
def last(self) -> Tuple[str, Any]: ...
|
||||
|
||||
class DbfilenameShelf(Shelf):
|
||||
def __init__(self, filename: str, flag: str = ..., protocol: Optional[int] = ..., writeback: bool = ...) -> None: ...
|
||||
def __init__(self, filename: str, flag: str = ..., protocol: int | None = ..., writeback: bool = ...) -> None: ...
|
||||
|
||||
def open(filename: str, flag: str = ..., protocol: Optional[int] = ..., writeback: bool = ...) -> DbfilenameShelf: ...
|
||||
def open(filename: str, flag: str = ..., protocol: int | None = ..., writeback: bool = ...) -> DbfilenameShelf: ...
|
||||
|
||||
Reference in New Issue
Block a user