mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Remove Python 2 support from simplejson (#7704)
This commit is contained in:
@@ -1,2 +1 @@
|
||||
version = "3.17.*"
|
||||
python2 = true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import IO, Any, Text
|
||||
from typing import IO, Any
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from simplejson.decoder import JSONDecoder as JSONDecoder
|
||||
@@ -6,7 +6,7 @@ from simplejson.encoder import JSONEncoder as JSONEncoder, JSONEncoderForHTML as
|
||||
from simplejson.raw_json import RawJSON as RawJSON
|
||||
from simplejson.scanner import JSONDecodeError as JSONDecodeError
|
||||
|
||||
_LoadsString: TypeAlias = Text | bytes | bytearray
|
||||
_LoadsString: TypeAlias = str | bytes | bytearray
|
||||
|
||||
def dumps(obj: Any, *args: Any, **kwds: Any) -> str: ...
|
||||
def dump(obj: Any, fp: IO[str], *args: Any, **kwds: Any) -> None: ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from typing import Any, Match
|
||||
|
||||
class JSONDecoder(object):
|
||||
class JSONDecoder:
|
||||
def __init__(self, **kwargs: Any) -> None: ...
|
||||
def decode(self, s: str, _w: Match[str], _PY3: bool): ...
|
||||
def raw_decode(self, s: str, idx: int, _w: Match[str], _PY3: bool): ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from typing import Any
|
||||
|
||||
class JSONEncoder(object):
|
||||
class JSONEncoder:
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def encode(self, o: Any): ...
|
||||
def default(self, o: Any): ...
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
class RawJSON(object):
|
||||
class RawJSON:
|
||||
encoded_json: str
|
||||
def __init__(self, encoded_json: str) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user