mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-11-04 00:52:08 +00:00 
			
		
		
		
	utils/serializer: pylint fixes
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user