From 2610c5ee379ef2acfc964857544929097ac704a1 Mon Sep 17 00:00:00 2001 From: Samuel T Date: Sun, 5 Dec 2021 05:32:37 -0500 Subject: [PATCH] Create simplejson.errors (#6492) --- stubs/simplejson/simplejson/errors.pyi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 stubs/simplejson/simplejson/errors.pyi diff --git a/stubs/simplejson/simplejson/errors.pyi b/stubs/simplejson/simplejson/errors.pyi new file mode 100644 index 000000000..10cff3f28 --- /dev/null +++ b/stubs/simplejson/simplejson/errors.pyi @@ -0,0 +1,16 @@ +__all__ = ["JSONDecodeError"] + +def linecol(doc: str, pos: int) -> tuple[int, int]: ... +def errmsg(msg: str, doc: str, pos: int, end: int | None = ...) -> str: ... + +class JSONDecodeError(ValueError): + msg: str + doc: str + pos: int + end: int | None + lineno: int + colno: int + endlineno: int | None + endcolno: int | None + def __init__(self, msg: str, doc: str, pos: int, end: int | None = ...) -> None: ... + def __reduce__(self) -> tuple[JSONDecodeError, tuple[str, str, int, int | None]]: ...