mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Flake8 fixes (#2549)
* Fix over-indented continuation lines * Fix under-indented continuation lines * Fix whitespace around default operator problems * Limit line lengths * Fix inconsistent files
This commit is contained in:
committed by
Jelle Zijlstra
parent
f362cf47fa
commit
006a79220f
@@ -7,52 +7,52 @@ if sys.version_info >= (3, 5):
|
||||
from .decoder import JSONDecodeError as JSONDecodeError
|
||||
|
||||
def dumps(obj: Any,
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
cls: Any = ...,
|
||||
indent: Union[None, int, str] = ...,
|
||||
separators: Optional[Tuple[str, str]] = ...,
|
||||
default: Optional[Callable[[Any], Any]] = ...,
|
||||
sort_keys: bool = ...,
|
||||
**kwds: Any) -> str: ...
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
cls: Any = ...,
|
||||
indent: Union[None, int, str] = ...,
|
||||
separators: Optional[Tuple[str, str]] = ...,
|
||||
default: Optional[Callable[[Any], Any]] = ...,
|
||||
sort_keys: bool = ...,
|
||||
**kwds: Any) -> str: ...
|
||||
|
||||
def dump(obj: Any,
|
||||
fp: IO[str],
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
cls: Any = ...,
|
||||
indent: Union[None, int, str] = ...,
|
||||
separators: Optional[Tuple[str, str]] = ...,
|
||||
default: Optional[Callable[[Any], Any]] = ...,
|
||||
sort_keys: bool = ...,
|
||||
**kwds: Any) -> None: ...
|
||||
fp: IO[str],
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
cls: Any = ...,
|
||||
indent: Union[None, int, str] = ...,
|
||||
separators: Optional[Tuple[str, str]] = ...,
|
||||
default: Optional[Callable[[Any], Any]] = ...,
|
||||
sort_keys: bool = ...,
|
||||
**kwds: Any) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
_LoadsString = Union[str, bytes, bytearray]
|
||||
else:
|
||||
_LoadsString = str
|
||||
def loads(s: _LoadsString,
|
||||
encoding: Any = ..., # ignored and deprecated
|
||||
cls: Any = ...,
|
||||
object_hook: Optional[Callable[[Dict], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ...,
|
||||
**kwds: Any) -> Any: ...
|
||||
encoding: Any = ..., # ignored and deprecated
|
||||
cls: Any = ...,
|
||||
object_hook: Optional[Callable[[Dict], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ...,
|
||||
**kwds: Any) -> Any: ...
|
||||
|
||||
class _Reader(Protocol):
|
||||
def read(self) -> _LoadsString: ...
|
||||
|
||||
def load(fp: _Reader,
|
||||
cls: Any = ...,
|
||||
object_hook: Optional[Callable[[Dict], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ...,
|
||||
**kwds: Any) -> Any: ...
|
||||
cls: Any = ...,
|
||||
object_hook: Optional[Callable[[Dict], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ...,
|
||||
**kwds: Any) -> Any: ...
|
||||
|
||||
@@ -19,10 +19,10 @@ class JSONDecoder:
|
||||
object_pairs_hook = ... # type: Callable[[List[Tuple[str, Any]]], Any]
|
||||
|
||||
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]] = ...,
|
||||
strict: bool = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[str, Any]]], Any]] = ...) -> None: ...
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
strict: bool = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[str, Any]]], Any]] = ...) -> None: ...
|
||||
def decode(self, s: str) -> Any: ...
|
||||
def raw_decode(self, s: str, idx: int = ...) -> Tuple[Any, int]: ...
|
||||
|
||||
@@ -12,8 +12,9 @@ class JSONEncoder:
|
||||
indent = ... # type: int
|
||||
|
||||
def __init__(self, skipkeys: bool = ..., ensure_ascii: bool = ...,
|
||||
check_circular: bool = ..., allow_nan: bool = ..., sort_keys: bool = ...,
|
||||
indent: Optional[int] = ..., separators: Optional[Tuple[str, str]] = ..., default: Optional[Callable] = ...) -> None: ...
|
||||
check_circular: bool = ..., allow_nan: bool = ..., sort_keys: bool = ...,
|
||||
indent: Optional[int] = ..., separators: Optional[Tuple[str, str]] = ...,
|
||||
default: Optional[Callable] = ...) -> None: ...
|
||||
|
||||
def default(self, o: Any) -> Any: ...
|
||||
def encode(self, o: Any) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user