From 4276136d7a0eaa00dd150e747c87623aaeabfaaf Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Thu, 20 Oct 2022 15:22:15 +0300 Subject: [PATCH] Remove `simplejson` from `pyright`'s exclude (#8945) --- pyrightconfig.stricter.json | 1 - stubs/simplejson/simplejson/decoder.pyi | 4 ++-- stubs/simplejson/simplejson/encoder.pyi | 9 +++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pyrightconfig.stricter.json b/pyrightconfig.stricter.json index 4a76c2021..2870a7b34 100644 --- a/pyrightconfig.stricter.json +++ b/pyrightconfig.stricter.json @@ -80,7 +80,6 @@ "stubs/requests", "stubs/Send2Trash", "stubs/setuptools", - "stubs/simplejson", "stubs/slumber", "stubs/SQLAlchemy", "stubs/stripe", diff --git a/stubs/simplejson/simplejson/decoder.pyi b/stubs/simplejson/simplejson/decoder.pyi index babb0f633..d2b1ac14a 100644 --- a/stubs/simplejson/simplejson/decoder.pyi +++ b/stubs/simplejson/simplejson/decoder.pyi @@ -3,5 +3,5 @@ from typing import Any 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): ... + def decode(self, s: str, _w: Match[str], _PY3: bool) -> Any: ... + def raw_decode(self, s: str, idx: int, _w: Match[str], _PY3: bool) -> tuple[Any, int]: ... diff --git a/stubs/simplejson/simplejson/encoder.pyi b/stubs/simplejson/simplejson/encoder.pyi index 7997976e6..004545b83 100644 --- a/stubs/simplejson/simplejson/encoder.pyi +++ b/stubs/simplejson/simplejson/encoder.pyi @@ -1,9 +1,10 @@ -from typing import Any +from collections.abc import Iterator +from typing import Any, NoReturn class JSONEncoder: def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def encode(self, o: Any): ... - def default(self, o: Any): ... - def iterencode(self, o: Any, _one_shot: bool): ... + def encode(self, o: Any) -> str: ... + def default(self, o: Any) -> NoReturn: ... + def iterencode(self, o: Any, _one_shot: bool) -> Iterator[str]: ... class JSONEncoderForHTML(JSONEncoder): ...