json.dump{s,}' indent parameter also supports str (#175)

This commit is contained in:
FichteFoll
2016-05-02 02:50:03 +02:00
committed by Guido van Rossum
parent dfd4365b45
commit 6537649fda

View File

@@ -1,4 +1,4 @@
from typing import Any, IO, Optional, Tuple, Callable, Dict, List
from typing import Any, IO, Optional, Tuple, Callable, Dict, List, Union
class JSONDecodeError(object):
def dumps(self, obj: Any) -> str: ...
@@ -12,7 +12,7 @@ def dumps(obj: Any,
check_circular: bool = ...,
allow_nan: bool = ...,
cls: Any = ...,
indent: Optional[int] = ...,
indent: Union[None, int, str] = ...,
separators: Optional[Tuple[str, str]] = ...,
default: Optional[Callable[[Any], Any]] = ...,
sort_keys: bool = ...,
@@ -25,7 +25,7 @@ def dump(obj: Any,
check_circular: bool = ...,
allow_nan: bool = ...,
cls: Any = ...,
indent: Optional[int] = ...,
indent: Union[None, int, str] = ...,
separators: Optional[Tuple[str, str]] = ...,
default: Optional[Callable[[Any], Any]] = ...,
sort_keys: bool = ...,