Update hacking to version 1.1
Update hacking, fix a couple of problems found. Change-Id: Ie903e3ddf13e78d758b26e884bb1fb0e1a6ed73c
This commit is contained in:
parent
fb686b9e2b
commit
ecc2997769
@ -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
Block a user