From 313b584e34df1cdce4ccd59dda7c315de6a445d2 Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Thu, 11 Aug 2016 17:08:03 -0700 Subject: [PATCH] Add stubs for ujson (#460) --- third_party/2and3/ujson.pyi | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 third_party/2and3/ujson.pyi diff --git a/third_party/2and3/ujson.pyi b/third_party/2and3/ujson.pyi new file mode 100644 index 000000000..147f67a56 --- /dev/null +++ b/third_party/2and3/ujson.pyi @@ -0,0 +1,45 @@ +# Stubs for ujson +# See: https://pypi.python.org/pypi/ujson +from typing import Any, IO, Optional + +__version__ = ... # type: str + +def encode(obj: Any, + ensure_ascii: bool = ..., + double_precision: bool = ..., + encode_html_chars: bool = ..., + escape_forward_slashes: bool = ..., + sort_keys: bool = ..., + indent: int = ..., + ) -> str: ... + +def dumps(obj: Any, + ensure_ascii: bool = ..., + double_precision: bool = ..., + encode_html_chars: bool = ..., + escape_forward_slashes: bool = ..., + sort_keys: bool = ..., + indent: int = ..., + ) -> str: ... + +def dump(obj: Any, + fp: IO[str], + ensure_ascii: bool = ..., + double_precision: bool = ..., + encode_html_chars: bool = ..., + escape_forward_slashes: bool = ..., + sort_keys: bool = ..., + indent: int = ..., + ) -> None: ... + +def decode(s: str, + precise_float: bool = ..., + ) -> Any: ... + +def loads(s: str, + precise_float: bool = ..., + ) -> Any: ... + +def load(fp: IO[str], + precise_float: bool = ..., + ) -> Any: ...