mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Accept bytes as 1st argument of simplejson.loads (#2896)
This commit is contained in:
committed by
Sebastian Rittau
parent
f11d061849
commit
0f5302b3b5
7
third_party/2and3/simplejson/__init__.pyi
vendored
7
third_party/2and3/simplejson/__init__.pyi
vendored
@@ -1,10 +1,13 @@
|
||||
from typing import Any, IO, Text
|
||||
from typing import Any, IO, Text, Union
|
||||
|
||||
from simplejson.scanner import JSONDecodeError as JSONDecodeError
|
||||
from simplejson.decoder import JSONDecoder as JSONDecoder
|
||||
from simplejson.encoder import JSONEncoder as JSONEncoder, JSONEncoderForHTML as JSONEncoderForHTML
|
||||
|
||||
_LoadsString = Union[Text, bytes, bytearray]
|
||||
|
||||
|
||||
def dumps(obj: Any, *args: Any, **kwds: Any) -> str: ...
|
||||
def dump(obj: Any, fp: IO[str], *args: Any, **kwds: Any) -> None: ...
|
||||
def loads(s: Text, **kwds: Any) -> Any: ...
|
||||
def loads(s: _LoadsString, **kwds: Any) -> Any: ...
|
||||
def load(fp: IO[str], **kwds: Any) -> Any: ...
|
||||
|
||||
Reference in New Issue
Block a user