mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-01 00:53:23 +08:00
Use lowercase tuple where possible (#6170)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from _typeshed import SupportsRead
|
||||
from typing import IO, Any, Callable, Tuple, Type
|
||||
from typing import IO, Any, Callable, Type
|
||||
|
||||
from .decoder import JSONDecodeError as JSONDecodeError, JSONDecoder as JSONDecoder
|
||||
from .encoder import JSONEncoder as JSONEncoder
|
||||
@@ -13,7 +13,7 @@ def dumps(
|
||||
allow_nan: bool = ...,
|
||||
cls: Type[JSONEncoder] | None = ...,
|
||||
indent: None | int | str = ...,
|
||||
separators: Tuple[str, str] | None = ...,
|
||||
separators: tuple[str, str] | None = ...,
|
||||
default: Callable[[Any], Any] | None = ...,
|
||||
sort_keys: bool = ...,
|
||||
**kwds: Any,
|
||||
@@ -28,7 +28,7 @@ def dump(
|
||||
allow_nan: bool = ...,
|
||||
cls: Type[JSONEncoder] | None = ...,
|
||||
indent: None | int | str = ...,
|
||||
separators: Tuple[str, str] | None = ...,
|
||||
separators: tuple[str, str] | None = ...,
|
||||
default: Callable[[Any], Any] | None = ...,
|
||||
sort_keys: bool = ...,
|
||||
**kwds: Any,
|
||||
@@ -41,7 +41,7 @@ def loads(
|
||||
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(
|
||||
@@ -52,7 +52,7 @@ def load(
|
||||
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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Callable, Tuple
|
||||
from typing import Any, Callable
|
||||
|
||||
class JSONDecodeError(ValueError):
|
||||
msg: str
|
||||
@@ -14,7 +14,7 @@ class JSONDecoder:
|
||||
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,
|
||||
*,
|
||||
@@ -23,7 +23,7 @@ class JSONDecoder:
|
||||
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]: ...
|
||||
def raw_decode(self, s: str, idx: int = ...) -> tuple[Any, int]: ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Callable, Iterator, Tuple
|
||||
from typing import Any, Callable, Iterator
|
||||
|
||||
def py_encode_basestring(s: str) -> str: ... # undocumented
|
||||
def py_encode_basestring_ascii(s: str) -> str: ... # undocumented
|
||||
@@ -22,7 +22,7 @@ class JSONEncoder:
|
||||
allow_nan: bool = ...,
|
||||
sort_keys: bool = ...,
|
||||
indent: int | None = ...,
|
||||
separators: Tuple[str, str] | None = ...,
|
||||
separators: tuple[str, str] | None = ...,
|
||||
default: Callable[..., Any] | None = ...,
|
||||
) -> None: ...
|
||||
def default(self, o: Any) -> Any: ...
|
||||
|
||||
Reference in New Issue
Block a user