From 49b544c03b4d2b48e1e1186f89ebc3395f312c45 Mon Sep 17 00:00:00 2001 From: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com> Date: Fri, 4 Mar 2022 00:35:14 +0200 Subject: [PATCH 1/2] Add type hints for tomllib --- stdlib/tomllib.pyi | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 stdlib/tomllib.pyi diff --git a/stdlib/tomllib.pyi b/stdlib/tomllib.pyi new file mode 100644 index 000000000000..208372285e69 --- /dev/null +++ b/stdlib/tomllib.pyi @@ -0,0 +1,8 @@ +from _typeshed import SupportsRead +from collections.abc import Callable +from typing import Any + +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]: ... From 52a4e2f318b89f2a79cd617601ba8bc82074c01b Mon Sep 17 00:00:00 2001 From: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com> Date: Fri, 4 Mar 2022 00:53:44 +0200 Subject: [PATCH 2/2] Add tomllib to stdlib/VERSIONS --- stdlib/VERSIONS | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/VERSIONS b/stdlib/VERSIONS index aa12ba88fb13..d3ba459dd9e3 100644 --- a/stdlib/VERSIONS +++ b/stdlib/VERSIONS @@ -262,6 +262,7 @@ timeit: 2.7- tkinter: 3.0- token: 2.7- tokenize: 2.7- +tomllib: 3.11- trace: 2.7- traceback: 2.7- tracemalloc: 3.4-