Add type hints for tomllib (#7432)

This commit is contained in:
Taneli Hukkinen
2022-03-04 01:04:33 +02:00
committed by GitHub
parent c50cb066e0
commit 31b11c6eae
2 changed files with 9 additions and 0 deletions

View File

@@ -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-

8
stdlib/tomllib.pyi Normal file
View File

@@ -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]: ...