mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Add basic type annotations for YAML load functions (#1657)
These are probably the most common YAML functions, so this should be useful even without type declarations on the rest of the package.
This commit is contained in:
committed by
Matthias Kramm
parent
b7dc041f44
commit
72e24b8443
10
third_party/2and3/yaml/__init__.pyi
vendored
10
third_party/2and3/yaml/__init__.pyi
vendored
@@ -1,4 +1,4 @@
|
||||
from typing import Any
|
||||
from typing import Any, Iterator, Union, IO
|
||||
from yaml.error import * # noqa: F403
|
||||
from yaml.tokens import * # noqa: F403
|
||||
from yaml.events import * # noqa: F403
|
||||
@@ -14,10 +14,10 @@ def scan(stream, Loader=...): ...
|
||||
def parse(stream, Loader=...): ...
|
||||
def compose(stream, Loader=...): ...
|
||||
def compose_all(stream, Loader=...): ...
|
||||
def load(stream, Loader=...): ...
|
||||
def load_all(stream, Loader=...): ...
|
||||
def safe_load(stream): ...
|
||||
def safe_load_all(stream): ...
|
||||
def load(stream: Union[str, IO[str]], Loader: Loader=...) -> Any: ...
|
||||
def load_all(stream: Union[str, IO[str]], Loader: Loader=...) -> Iterator[Any]: ...
|
||||
def safe_load(stream: Union[str, IO[str]]) -> Any: ...
|
||||
def safe_load_all(stream: Union[str, IO[str]]) -> Iterator[Any]: ...
|
||||
def emit(events, stream=..., Dumper=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=...): ...
|
||||
def serialize_all(nodes, stream=..., Dumper=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=...): ...
|
||||
def serialize(node, stream=..., Dumper=..., **kwds): ...
|
||||
|
||||
Reference in New Issue
Block a user