| 1 | # SPDX-License-Identifier: MIT |
| 2 | |
| 3 | __all__ = ['BaseDumper', 'SafeDumper', 'Dumper'] |
| 4 | |
| 5 | from .emitter import * |
| 6 | from .serializer import * |
| 7 | from .representer import * |
| 8 | from .resolver import * |
| 9 | |
| 10 | class BaseDumper(Emitter, Serializer, BaseRepresenter, BaseResolver): |
| 11 | |
| 12 | def __init__(self, stream, |
| 13 | default_style=None, default_flow_style=None, |
| 14 | canonical=None, indent=None, width=None, |
| 15 | allow_unicode=None, line_break=None, |
| 16 | encoding=None, explicit_start=None, explicit_end=None, |
| 17 | version=None, tags=None): |
| 18 | Emitter.__init__(self, stream, canonical=canonical, |
| 19 | indent=indent, width=width, |
| 20 | allow_unicode=allow_unicode, line_break=line_break) |
| 21 | Serializer.__init__(self, encoding=encoding, |
| 22 | explicit_start=explicit_start, explicit_end=explicit_end, |
| 23 | version=version, tags=tags) |
| 24 | Representer.__init__(self, default_style=default_style, |
| 25 | default_flow_style=default_flow_style) |
| 26 | Resolver.__init__(self) |
| 27 | |
| 28 | class SafeDumper(Emitter, Serializer, SafeRepresenter, Resolver): |
| 29 | |
| 30 | def __init__(self, stream, |
| 31 | default_style=None, default_flow_style=None, |
| 32 | canonical=None, indent=None, width=None, |
| 33 | allow_unicode=None, line_break=None, |
| 34 | encoding=None, explicit_start=None, explicit_end=None, |
| 35 | version=None, tags=None): |
| 36 | Emitter.__init__(self, stream, canonical=canonical, |
| 37 | indent=indent, width=width, |
| 38 | allow_unicode=allow_unicode, line_break=line_break) |
| 39 | Serializer.__init__(self, encoding=encoding, |
| 40 | explicit_start=explicit_start, explicit_end=explicit_end, |
| 41 | version=version, tags=tags) |
| 42 | SafeRepresenter.__init__(self, default_style=default_style, |
| 43 | default_flow_style=default_flow_style) |
| 44 | Resolver.__init__(self) |
| 45 | |
| 46 | class Dumper(Emitter, Serializer, Representer, Resolver): |
| 47 | |
| 48 | def __init__(self, stream, |
| 49 | default_style=None, default_flow_style=None, |
| 50 | canonical=None, indent=None, width=None, |
| 51 | allow_unicode=None, line_break=None, |
| 52 | encoding=None, explicit_start=None, explicit_end=None, |
| 53 | version=None, tags=None): |
| 54 | Emitter.__init__(self, stream, canonical=canonical, |
| 55 | indent=indent, width=width, |
| 56 | allow_unicode=allow_unicode, line_break=line_break) |
| 57 | Serializer.__init__(self, encoding=encoding, |
| 58 | explicit_start=explicit_start, explicit_end=explicit_end, |
| 59 | version=version, tags=tags) |
| 60 | Representer.__init__(self, default_style=default_style, |
| 61 | default_flow_style=default_flow_style) |
| 62 | Resolver.__init__(self) |
| 63 |