Add type hints for orjson (#2747)

This commit is contained in:
ijl
2019-02-11 00:56:57 +00:00
committed by Sebastian Rittau
parent b00bb54dc5
commit 9bbe60978e

14
third_party/3/orjson.pyi vendored Normal file
View File

@@ -0,0 +1,14 @@
# https://github.com/ijl/orjson/blob/master/orjson.pyi
from typing import Any, Callable, Optional, Union
def dumps(
obj: Any, default: Optional[Callable[[Any], Any]], option: Optional[int]
) -> bytes: ...
def loads(obj: Union[bytes, str]) -> Any: ...
class JSONDecodeError(ValueError): ...
class JSONEncodeError(TypeError): ...
OPT_STRICT_INTEGER: int
OPT_NAIVE_UTC: int