Big diff: use lower-case list and dict (#5888)

This commit is contained in:
Akuli authored and GitHub committed 2021-08-08 09:26:35 -07:00
1 parent 11f54c3407
commit ce11072dbe
325 files changed
+2196 -2334

No files matched your search

+5 -5
View File
@@ -1,5 +1,5 @@
from _typeshed import SupportsRead
from typing import IO, Any, Callable, Dict, List, Tuple, Type
from typing import IO, Any, Callable, Tuple, Type
from .decoder import JSONDecodeError as JSONDecodeError, JSONDecoder as JSONDecoder
from .encoder import JSONEncoder as JSONEncoder
@@ -37,22 +37,22 @@ def loads(
s: str | bytes,
*,
cls: Type[JSONDecoder] | None = ...,
object_hook: Callable[[Dict[Any, Any]], Any] | None = ...,
object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
parse_float: Callable[[str], Any] | None = ...,
parse_int: Callable[[str], Any] | None = ...,
parse_constant: Callable[[str], Any] | None = ...,
object_pairs_hook: Callable[[List[Tuple[Any, Any]]], Any] | None = ...,
object_pairs_hook: Callable[[list[Tuple[Any, Any]]], Any] | None = ...,
**kwds: Any,
) -> Any: ...
def load(
fp: SupportsRead[str | bytes],
*,
cls: Type[JSONDecoder] | None = ...,
object_hook: Callable[[Dict[Any, Any]], Any] | None = ...,
object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
parse_float: Callable[[str], Any] | None = ...,
parse_int: Callable[[str], Any] | None = ...,
parse_constant: Callable[[str], Any] | None = ...,
object_pairs_hook: Callable[[List[Tuple[Any, Any]]], Any] | None = ...,
object_pairs_hook: Callable[[list[Tuple[Any, Any]]], Any] | None = ...,
**kwds: Any,
) -> Any: ...
def detect_encoding(b: bytes) -> str: ... # undocumented
+5 -5
View File
@@ -1,4 +1,4 @@
from typing import Any, Callable, Dict, List, Tuple
from typing import Any, Callable, Tuple
class JSONDecodeError(ValueError):
msg: str
@@ -9,21 +9,21 @@ class JSONDecodeError(ValueError):
def __init__(self, msg: str, doc: str, pos: int) -> None: ...
class JSONDecoder:
object_hook: Callable[[Dict[str, Any]], Any]
object_hook: Callable[[dict[str, Any]], Any]
parse_float: Callable[[str], Any]
parse_int: Callable[[str], Any]
parse_constant: Callable[[str], Any] = ...
strict: bool
object_pairs_hook: Callable[[List[Tuple[str, Any]]], Any]
object_pairs_hook: Callable[[list[Tuple[str, Any]]], Any]
def __init__(
self,
*,
object_hook: Callable[[Dict[str, Any]], Any] | None = ...,
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: Callable[[List[Tuple[str, Any]]], Any] | None = ...,
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]: ...