@@ -13,15 +13,15 @@ def __init__(self, stream,
1313 canonical = None , indent = None , width = None ,
1414 allow_unicode = None , line_break = None ,
1515 encoding = None , explicit_start = None , explicit_end = None ,
16- version = None , tags = None ):
16+ version = None , tags = None , sort_keys = True ):
1717 Emitter .__init__ (self , stream , canonical = canonical ,
1818 indent = indent , width = width ,
1919 allow_unicode = allow_unicode , line_break = line_break )
2020 Serializer .__init__ (self , encoding = encoding ,
2121 explicit_start = explicit_start , explicit_end = explicit_end ,
2222 version = version , tags = tags )
2323 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 )
2525 Resolver .__init__ (self )
2626
2727class SafeDumper (Emitter , Serializer , SafeRepresenter , Resolver ):
@@ -31,15 +31,15 @@ def __init__(self, stream,
3131 canonical = None , indent = None , width = None ,
3232 allow_unicode = None , line_break = None ,
3333 encoding = None , explicit_start = None , explicit_end = None ,
34- version = None , tags = None ):
34+ version = None , tags = None , sort_keys = True ):
3535 Emitter .__init__ (self , stream , canonical = canonical ,
3636 indent = indent , width = width ,
3737 allow_unicode = allow_unicode , line_break = line_break )
3838 Serializer .__init__ (self , encoding = encoding ,
3939 explicit_start = explicit_start , explicit_end = explicit_end ,
4040 version = version , tags = tags )
4141 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 )
4343 Resolver .__init__ (self )
4444
4545class Dumper (Emitter , Serializer , Representer , Resolver ):
@@ -49,14 +49,14 @@ def __init__(self, stream,
4949 canonical = None , indent = None , width = None ,
5050 allow_unicode = None , line_break = None ,
5151 encoding = None , explicit_start = None , explicit_end = None ,
52- version = None , tags = None ):
52+ version = None , tags = None , sort_keys = True ):
5353 Emitter .__init__ (self , stream , canonical = canonical ,
5454 indent = indent , width = width ,
5555 allow_unicode = allow_unicode , line_break = line_break )
5656 Serializer .__init__ (self , encoding = encoding ,
5757 explicit_start = explicit_start , explicit_end = explicit_end ,
5858 version = version , tags = tags )
5959 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 )
6161 Resolver .__init__ (self )
6262
0 commit comments