Skip to content

Commit 313b584

Browse files
Michael0x2agvanrossum
authored andcommitted
Add stubs for ujson (#460)
1 parent 2824cd1 commit 313b584

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

third_party/2and3/ujson.pyi

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Stubs for ujson
2+
# See: https://pypi.python.org/pypi/ujson
3+
from typing import Any, IO, Optional
4+
5+
__version__ = ... # type: str
6+
7+
def encode(obj: Any,
8+
ensure_ascii: bool = ...,
9+
double_precision: bool = ...,
10+
encode_html_chars: bool = ...,
11+
escape_forward_slashes: bool = ...,
12+
sort_keys: bool = ...,
13+
indent: int = ...,
14+
) -> str: ...
15+
16+
def dumps(obj: Any,
17+
ensure_ascii: bool = ...,
18+
double_precision: bool = ...,
19+
encode_html_chars: bool = ...,
20+
escape_forward_slashes: bool = ...,
21+
sort_keys: bool = ...,
22+
indent: int = ...,
23+
) -> str: ...
24+
25+
def dump(obj: Any,
26+
fp: IO[str],
27+
ensure_ascii: bool = ...,
28+
double_precision: bool = ...,
29+
encode_html_chars: bool = ...,
30+
escape_forward_slashes: bool = ...,
31+
sort_keys: bool = ...,
32+
indent: int = ...,
33+
) -> None: ...
34+
35+
def decode(s: str,
36+
precise_float: bool = ...,
37+
) -> Any: ...
38+
39+
def loads(s: str,
40+
precise_float: bool = ...,
41+
) -> Any: ...
42+
43+
def load(fp: IO[str],
44+
precise_float: bool = ...,
45+
) -> Any: ...

0 commit comments

Comments
 (0)