mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-26 12:56:46 +08:00
Re-organize directory structure (#4971)
See discussion in #2491 Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
12
stubs/simplejson/simplejson/__init__.pyi
Normal file
12
stubs/simplejson/simplejson/__init__.pyi
Normal file
@@ -0,0 +1,12 @@
|
||||
from typing import IO, Any, Text, Union
|
||||
|
||||
from simplejson.decoder import JSONDecoder as JSONDecoder
|
||||
from simplejson.encoder import JSONEncoder as JSONEncoder, JSONEncoderForHTML as JSONEncoderForHTML
|
||||
from simplejson.scanner import JSONDecodeError as JSONDecodeError
|
||||
|
||||
_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: _LoadsString, **kwds: Any) -> Any: ...
|
||||
def load(fp: IO[str], **kwds: Any) -> Any: ...
|
||||
6
stubs/simplejson/simplejson/decoder.pyi
Normal file
6
stubs/simplejson/simplejson/decoder.pyi
Normal file
@@ -0,0 +1,6 @@
|
||||
from typing import Match
|
||||
|
||||
class JSONDecoder(object):
|
||||
def __init__(self, **kwargs): ...
|
||||
def decode(self, s: str, _w: Match[str], _PY3: bool): ...
|
||||
def raw_decode(self, s: str, idx: int, _w: Match[str], _PY3: bool): ...
|
||||
9
stubs/simplejson/simplejson/encoder.pyi
Normal file
9
stubs/simplejson/simplejson/encoder.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
from typing import Any
|
||||
|
||||
class JSONEncoder(object):
|
||||
def __init__(self, *args, **kwargs): ...
|
||||
def encode(self, o: Any): ...
|
||||
def default(self, o: Any): ...
|
||||
def iterencode(self, o: Any, _one_shot: bool): ...
|
||||
|
||||
class JSONEncoderForHTML(JSONEncoder): ...
|
||||
11
stubs/simplejson/simplejson/scanner.pyi
Normal file
11
stubs/simplejson/simplejson/scanner.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from typing import Optional
|
||||
|
||||
class JSONDecodeError(ValueError):
|
||||
msg: str = ...
|
||||
doc: str = ...
|
||||
pos: int = ...
|
||||
end: Optional[int] = ...
|
||||
lineno: int = ...
|
||||
colno: int = ...
|
||||
endlineno: Optional[int] = ...
|
||||
endcolno: Optional[int] = ...
|
||||
Reference in New Issue
Block a user