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

This commit is contained in:
FichteFoll authored and Guido van Rossum committed 2016-05-01 17:50:03 -07:00
1 parent dfd4365b45
commit 6537649fda
1 file changed
+3 -3
+3 -3
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 = ...,