1 from _typeshed import SupportsWrite
2 from collections.abc import Mapping
4 from yaml.emitter import Emitter
5 from yaml.representer import BaseRepresenter, Representer, SafeRepresenter
6 from yaml.resolver import BaseResolver, Resolver
7 from yaml.serializer import Serializer
9 class BaseDumper(Emitter, Serializer, BaseRepresenter, BaseResolver):
12 stream: SupportsWrite[bytes | str],
13 default_style: str | None = ...,
14 default_flow_style: bool | None = ...,
15 canonical: bool | None = ...,
16 indent: int | None = ...,
17 width: int | None = ...,
18 allow_unicode: bool | None = ...,
19 line_break: str | None = ...,
20 encoding: str | None = ...,
21 explicit_start: bool | None = ...,
22 explicit_end: bool | None = ...,
23 version: tuple[int, int] | None = ...,
24 tags: Mapping[str, str] | None = ...,
25 sort_keys: bool = ...,
28 class SafeDumper(Emitter, Serializer, SafeRepresenter, Resolver):
31 stream: SupportsWrite[bytes | str],
32 default_style: str | None = ...,
33 default_flow_style: bool | None = ...,
34 canonical: bool | None = ...,
35 indent: int | None = ...,
36 width: int | None = ...,
37 allow_unicode: bool | None = ...,
38 line_break: str | None = ...,
39 encoding: str | None = ...,
40 explicit_start: bool | None = ...,
41 explicit_end: bool | None = ...,
42 version: tuple[int, int] | None = ...,
43 tags: Mapping[str, str] | None = ...,
44 sort_keys: bool = ...,
47 class Dumper(Emitter, Serializer, Representer, Resolver):
50 stream: SupportsWrite[bytes | str],
51 default_style: str | None = ...,
52 default_flow_style: bool | None = ...,
53 canonical: bool | None = ...,
54 indent: int | None = ...,
55 width: int | None = ...,
56 allow_unicode: bool | None = ...,
57 line_break: str | None = ...,
58 encoding: str | None = ...,
59 explicit_start: bool | None = ...,
60 explicit_end: bool | None = ...,
61 version: tuple[int, int] | None = ...,
62 tags: Mapping[str, str] | None = ...,
63 sort_keys: bool = ...,