Switch to PEP-604 syntax in python2 stubs (#5915)

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
Oleg Höfling
2021-08-14 11:12:30 +02:00
committed by GitHub
parent 431c4f7fc1
commit ff63953188
235 changed files with 2473 additions and 2768 deletions

View File

@@ -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: ...