Merge "Update hacking to version 1.1"
This commit is contained in:
commit
bd06273806
|
@ -22,7 +22,7 @@ import yaml
|
|||
|
||||
|
||||
# from :
|
||||
# http://stackoverflow.com/questions/8640959/how-can-i-control-what-scalar-form-pyyaml-uses-for-my-data flake8: noqa
|
||||
# http://stackoverflow.com/questions/8640959/how-can-i-control-what-scalar-form-pyyaml-uses-for-my-data # flake8: noqa
|
||||
def should_use_block(value):
|
||||
for c in u"\u000a\u000d\u001c\u001d\u001e\u0085\u2028\u2029":
|
||||
if c in value:
|
||||
|
@ -33,7 +33,7 @@ def should_use_block(value):
|
|||
def my_represent_scalar(self, tag, value, style=None):
|
||||
if style is None:
|
||||
if should_use_block(value):
|
||||
style='|'
|
||||
style = '|'
|
||||
else:
|
||||
style = self.default_style
|
||||
|
||||
|
|
Loading…
Reference in New Issue