mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Fix PyLint C0103 on salt.utils.yaml
. Refs #1775.
This commit is contained in:
parent
70c841b372
commit
5cc3259f6d
@ -12,7 +12,7 @@ try:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
load = yaml.load
|
||||
load = yaml.load # pylint: disable-msg=C0103
|
||||
|
||||
|
||||
class DuplicateKeyWarning(RuntimeWarning):
|
||||
@ -22,6 +22,7 @@ class DuplicateKeyWarning(RuntimeWarning):
|
||||
|
||||
warnings.simplefilter('always', category=DuplicateKeyWarning)
|
||||
|
||||
|
||||
# with code integrated form https://gist.github.com/844388
|
||||
class CustomLoader(yaml.SafeLoader):
|
||||
'''
|
||||
@ -82,4 +83,3 @@ class CustomLoader(yaml.SafeLoader):
|
||||
and not node.value.startswith(('0b', '0x')):
|
||||
node.value = node.value.lstrip('0')
|
||||
return yaml.constructor.SafeConstructor.construct_scalar(self, node)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user