Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -1,4 +1,4 @@
from typing import Any, Callable, Dict, List, Optional, Tuple
from typing import Any, Callable, Dict, List, Tuple
class JSONDecodeError(ValueError):
msg: str
@@ -18,12 +18,12 @@ class JSONDecoder:
def __init__(
self,
*,
object_hook: Optional[Callable[[Dict[str, Any]], Any]] = ...,
parse_float: Optional[Callable[[str], Any]] = ...,
parse_int: Optional[Callable[[str], Any]] = ...,
parse_constant: Optional[Callable[[str], Any]] = ...,
object_hook: Callable[[Dict[str, Any]], Any] | None = ...,
parse_float: Callable[[str], Any] | None = ...,
parse_int: Callable[[str], Any] | None = ...,
parse_constant: Callable[[str], Any] | None = ...,
strict: bool = ...,
object_pairs_hook: Optional[Callable[[List[Tuple[str, Any]]], Any]] = ...,
object_pairs_hook: Callable[[List[Tuple[str, Any]]], Any] | None = ...,
) -> None: ...
def decode(self, s: str, _w: Callable[..., Any] = ...) -> Any: ... # _w is undocumented
def raw_decode(self, s: str, idx: int = ...) -> Tuple[Any, int]: ...