mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Bump tomllib.TOMLDecodeError to 3.14 (#14019)
This commit is contained in:
@@ -160,7 +160,6 @@ tarfile.TarFile.zstopen
|
||||
threading.Thread.__init__
|
||||
threading._RLock.locked
|
||||
tkinter.Event.__class_getitem__
|
||||
tomllib.TOMLDecodeError.__init__
|
||||
turtle.__all__
|
||||
turtle.RawTurtle.fill
|
||||
turtle.RawTurtle.poly
|
||||
|
||||
+18
-2
@@ -1,10 +1,26 @@
|
||||
import sys
|
||||
from _typeshed import SupportsRead
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
from typing import Any, overload
|
||||
from typing_extensions import deprecated
|
||||
|
||||
__all__ = ("loads", "load", "TOMLDecodeError")
|
||||
|
||||
class TOMLDecodeError(ValueError): ...
|
||||
if sys.version_info >= (3, 14):
|
||||
class TOMLDecodeError(ValueError):
|
||||
msg: str
|
||||
doc: str
|
||||
pos: int
|
||||
lineno: int
|
||||
colno: int
|
||||
@overload
|
||||
def __init__(self, msg: str, doc: str, pos: int) -> None: ...
|
||||
@overload
|
||||
@deprecated("Deprecated in Python 3.14; Please set 'msg', 'doc' and 'pos' arguments only.")
|
||||
def __init__(self, msg: str | type = ..., doc: str | type = ..., pos: int | type = ..., *args: Any) -> None: ...
|
||||
|
||||
else:
|
||||
class TOMLDecodeError(ValueError): ...
|
||||
|
||||
def load(fp: SupportsRead[bytes], /, *, parse_float: Callable[[str], Any] = ...) -> dict[str, Any]: ...
|
||||
def loads(s: str, /, *, parse_float: Callable[[str], Any] = ...) -> dict[str, Any]: ...
|
||||
|
||||
Reference in New Issue
Block a user