@@ -13,15 +13,15 @@ def __init__(self, stream,
13
13
canonical = None , indent = None , width = None ,
14
14
allow_unicode = None , line_break = None ,
15
15
encoding = None , explicit_start = None , explicit_end = None ,
16
- version = None , tags = None ):
16
+ version = None , tags = None , sort_keys = True ):
17
17
Emitter .__init__ (self , stream , canonical = canonical ,
18
18
indent = indent , width = width ,
19
19
allow_unicode = allow_unicode , line_break = line_break )
20
20
Serializer .__init__ (self , encoding = encoding ,
21
21
explicit_start = explicit_start , explicit_end = explicit_end ,
22
22
version = version , tags = tags )
23
23
Representer .__init__ (self , default_style = default_style ,
24
- default_flow_style = default_flow_style )
24
+ default_flow_style = default_flow_style , sort_keys = sort_keys )
25
25
Resolver .__init__ (self )
26
26
27
27
class SafeDumper (Emitter , Serializer , SafeRepresenter , Resolver ):
@@ -31,15 +31,15 @@ def __init__(self, stream,
31
31
canonical = None , indent = None , width = None ,
32
32
allow_unicode = None , line_break = None ,
33
33
encoding = None , explicit_start = None , explicit_end = None ,
34
- version = None , tags = None ):
34
+ version = None , tags = None , sort_keys = True ):
35
35
Emitter .__init__ (self , stream , canonical = canonical ,
36
36
indent = indent , width = width ,
37
37
allow_unicode = allow_unicode , line_break = line_break )
38
38
Serializer .__init__ (self , encoding = encoding ,
39
39
explicit_start = explicit_start , explicit_end = explicit_end ,
40
40
version = version , tags = tags )
41
41
SafeRepresenter .__init__ (self , default_style = default_style ,
42
- default_flow_style = default_flow_style )
42
+ default_flow_style = default_flow_style , sort_keys = sort_keys )
43
43
Resolver .__init__ (self )
44
44
45
45
class Dumper (Emitter , Serializer , Representer , Resolver ):
@@ -49,14 +49,14 @@ def __init__(self, stream,
49
49
canonical = None , indent = None , width = None ,
50
50
allow_unicode = None , line_break = None ,
51
51
encoding = None , explicit_start = None , explicit_end = None ,
52
- version = None , tags = None ):
52
+ version = None , tags = None , sort_keys = True ):
53
53
Emitter .__init__ (self , stream , canonical = canonical ,
54
54
indent = indent , width = width ,
55
55
allow_unicode = allow_unicode , line_break = line_break )
56
56
Serializer .__init__ (self , encoding = encoding ,
57
57
explicit_start = explicit_start , explicit_end = explicit_end ,
58
58
version = version , tags = tags )
59
59
Representer .__init__ (self , default_style = default_style ,
60
- default_flow_style = default_flow_style )
60
+ default_flow_style = default_flow_style , sort_keys = sort_keys )
61
61
Resolver .__init__ (self )
62
62
0 commit comments