Skip to content

Commit 0ecab10

Browse files
committed
yaml.dump(..., stream) is optional
<http://pyyaml.org/wiki/PyYAMLDocumentation#dumping-yaml> > yaml.dump accepts the second *optional* argument, which must be an open > text or binary file. In this case, yaml.dump will write the produced > YAML document into the file. Otherwise, yaml.dump returns the produced > document.
1 parent b261b22 commit 0ecab10

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

third_party/2and3/yaml/__init__.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Iterator, Sequence, Union, IO
1+
from typing import Any, Iterator, Optional, Sequence, Union, IO
22
from yaml.error import * # noqa: F403
33
from yaml.tokens import * # noqa: F403
44
from yaml.events import * # noqa: F403
@@ -22,10 +22,10 @@ def safe_load_all(stream: Union[str, IO[str]]) -> Iterator[Any]: ...
2222
def emit(events, stream=..., Dumper=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=...): ...
2323
def serialize_all(nodes, stream=..., Dumper=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=...): ...
2424
def serialize(node, stream=..., Dumper=..., **kwds): ...
25-
def dump_all(documents: Sequence[Any], stream: IO[str]=..., Dumper=..., default_style=..., default_flow_style=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=...) -> Any: ...
26-
def dump(data: Any, stream: IO[str]=..., Dumper=..., **kwds) -> Any: ...
27-
def safe_dump_all(documents: Sequence[Any], stream: IO[str]=..., **kwds) -> Any: ...
28-
def safe_dump(data: Any, stream: IO[str]=..., **kwds) -> Any: ...
25+
def dump_all(documents: Sequence[Any], stream: Optional[IO[str]]=..., Dumper=..., default_style=..., default_flow_style=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=...) -> Any: ...
26+
def dump(data: Any, stream: Optional[IO[str]]=..., Dumper=..., **kwds) -> Any: ...
27+
def safe_dump_all(documents: Sequence[Any], stream: Optional[IO[str]]=..., **kwds) -> Any: ...
28+
def safe_dump(data: Any, stream: Optional[IO[str]]=..., **kwds) -> Any: ...
2929
def add_implicit_resolver(tag, regexp, first=..., Loader=..., Dumper=...): ...
3030
def add_path_resolver(tag, path, kind=..., Loader=..., Dumper=...): ...
3131
def add_constructor(tag, constructor, Loader=...): ...

0 commit comments

Comments
 (0)