Skip to content

Commit 31b11c6

Browse files
authored
Add type hints for tomllib (#7432)
1 parent c50cb06 commit 31b11c6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

stdlib/VERSIONS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ timeit: 2.7-
262262
tkinter: 3.0-
263263
token: 2.7-
264264
tokenize: 2.7-
265+
tomllib: 3.11-
265266
trace: 2.7-
266267
traceback: 2.7-
267268
tracemalloc: 3.4-

stdlib/tomllib.pyi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from _typeshed import SupportsRead
2+
from collections.abc import Callable
3+
from typing import Any
4+
5+
class TOMLDecodeError(ValueError): ...
6+
7+
def load(__fp: SupportsRead[bytes], *, parse_float: Callable[[str], Any] = ...) -> dict[str, Any]: ...
8+
def loads(__s: str, *, parse_float: Callable[[str], Any] = ...) -> dict[str, Any]: ...

0 commit comments

Comments
 (0)