Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions stubs/toml/toml.pyi
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
import sys
from _typeshed import StrPath, SupportsWrite
from typing import IO, Any, Mapping, MutableMapping, Text, Union

if sys.version_info >= (3, 6):
_PathLike = StrPath
elif sys.version_info >= (3, 4):
import pathlib

_PathLike = Union[StrPath, pathlib.PurePath]
else:
_PathLike = StrPath
from typing import IO, Any, Mapping, MutableMapping, Text

class TomlDecodeError(Exception): ...

def load(f: _PathLike | list[Text] | IO[str], _dict: type[MutableMapping[str, Any]] = ...) -> MutableMapping[str, Any]: ...
def load(f: StrPath | list[Text] | IO[str], _dict: type[MutableMapping[str, Any]] = ...) -> MutableMapping[str, Any]: ...
def loads(s: Text, _dict: type[MutableMapping[str, Any]] = ...) -> MutableMapping[str, Any]: ...
def dump(o: Mapping[str, Any], f: SupportsWrite[str]) -> str: ...
def dumps(o: Mapping[str, Any]) -> str: ...