1 2__all__ = [ 3 'CBaseLoader', 'CSafeLoader', 'CFullLoader', 'CUnsafeLoader', 'CLoader', 4 'CBaseDumper', 'CSafeDumper', 'CDumper' 5] 6 7from yaml._yaml import CParser, CEmitter 8 9from .constructor import * 10 11from .serializer import * 12from .representer import * 13 14from .resolver import * 15 16class CBaseLoader(CParser, BaseConstructor, BaseResolver): 17 18 def __init__(self, stream): 19 CParser.__init__(self, stream) 20 BaseConstructor.__init__(self) 21 BaseResolver.__init__(self) 22 23class CSafeLoader(CParser, SafeConstructor, Resolver): 24 25 def __init__(self, stream): 26 CParser.__init__(self, stream) 27 SafeConstructor.__init__(self) 28 Resolver.__init__(self) 29 30class CFullLoader(CParser, FullConstructor, Resolver): 31 32 def __init__(self, stream): 33 CParser.__init__(self, stream) 34 FullConstructor.__init__(self) 35 Resolver.__init__(self) 36 37class CUnsafeLoader(CParser, UnsafeConstructor, Resolver): 38 39 def __init__(self, stream): 40 CParser.__init__(self, stream) 41 UnsafeConstructor.__init__(self) 42 Resolver.__init__(self) 43 44class CLoader(CParser, Constructor, Resolver): 45 46 def __init__(self, stream): 47 CParser.__init__(self, stream) 48 Constructor.__init__(self) 49 Resolver.__init__(self) 50 51class CBaseDumper(CEmitter, BaseRepresenter, BaseResolver): 52 53 def __init__(self, stream, 54 default_style=None, default_flow_style=False, 55 canonical=None, indent=None, width=None, 56 allow_unicode=None, line_break=None, 57 encoding=None, explicit_start=None, explicit_end=None, 58 version=None, tags=None, sort_keys=True): 59 CEmitter.__init__(self, stream, canonical=canonical, 60 indent=indent, width=width, encoding=encoding, 61 allow_unicode=allow_unicode, line_break=line_break, 62 explicit_start=explicit_start, explicit_end=explicit_end, 63 version=version, tags=tags) 64 Representer.__init__(self, default_style=default_style, 65 default_flow_style=default_flow_style, sort_keys=sort_keys) 66 Resolver.__init__(self) 67 68class CSafeDumper(CEmitter, SafeRepresenter, Resolver): 69 70 def __init__(self, stream, 71 default_style=None, default_flow_style=False, 72 canonical=None, indent=None, width=None, 73 allow_unicode=None, line_break=None, 74 encoding=None, explicit_start=None, explicit_end=None, 75 version=None, tags=None, sort_keys=True): 76 CEmitter.__init__(self, stream, canonical=canonical, 77 indent=indent, width=width, encoding=encoding, 78 allow_unicode=allow_unicode, line_break=line_break, 79 explicit_start=explicit_start, explicit_end=explicit_end, 80 version=version, tags=tags) 81 SafeRepresenter.__init__(self, default_style=default_style, 82 default_flow_style=default_flow_style, sort_keys=sort_keys) 83 Resolver.__init__(self) 84 85class CDumper(CEmitter, Serializer, Representer, Resolver): 86 87 def __init__(self, stream, 88 default_style=None, default_flow_style=False, 89 canonical=None, indent=None, width=None, 90 allow_unicode=None, line_break=None, 91 encoding=None, explicit_start=None, explicit_end=None, 92 version=None, tags=None, sort_keys=True): 93 CEmitter.__init__(self, stream, canonical=canonical, 94 indent=indent, width=width, encoding=encoding, 95 allow_unicode=allow_unicode, line_break=line_break, 96 explicit_start=explicit_start, explicit_end=explicit_end, 97 version=version, tags=tags) 98 Representer.__init__(self, default_style=default_style, 99 default_flow_style=default_flow_style, sort_keys=sort_keys) 100 Resolver.__init__(self) 101 102