1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-21 12:28:44 +00:00

utils/serializer: pylint fixes

This commit is contained in:
Marc Bonnici 2019-05-15 18:03:15 +01:00 committed by setrofim
parent ce59318e66
commit 76e6f14212

View File

@ -227,19 +227,19 @@ def _wa_cpu_mask_constructor(loader, node):
return cpu_mask(value)
class _WaYamlLoader(_yaml_loader):
class _WaYamlLoader(_yaml_loader): # pylint: disable=too-many-ancestors
def construct_mapping(self, node, deep=False):
if not isinstance(node, MappingNode):
raise ConstructorError(None, None,
"expected a mapping node, but found %s" % node.id,
node.start_mark)
"expected a mapping node, but found %s" % node.id,
node.start_mark)
mapping = OrderedDict()
for key_node, value_node in node.value:
key = self.construct_object(key_node, deep=deep)
if not isinstance(key, Hashable):
raise ConstructorError("while constructing a mapping", node.start_mark,
"found unhashable key", key_node.start_mark)
"found unhashable key", key_node.start_mark)
value = self.construct_object(value_node, deep=deep)
mapping[key] = value
return mapping