def __new__(metaclass, name, parents, class_dict, *kargs, **kwargs):
attributes = {name: attribute for name, attribute in class_dict.items() if isinstance(attribute,<EOL>AbstractAttribute)}<EOL>if attributes:<EOL><INDENT>if hasattr(parents[<NUM_LIT:0>], '<STR_LIT>'):<EOL><INDENT>full_attributes = parents[<NUM_LIT:0>].attribute_descriptors.copy()<EOL>full_attributes.update(attributes)<EOL>attributes = full_attributes<EOL><DEDENT>blok_attributes = {}<EOL>render_attributes = []<EOL>direct_attributes = []<EOL>init_attributes = []<EOL>accessor_attributes = []<EOL>attribute_map = {}<EOL>for attribute_name, attribute in attributes.items():<EOL><INDENT>if not hasattr(attribute, '<STR_LIT:name>'):<EOL><INDENT>attribute.name = attribute_name<EOL><DEDENT>if isinstance(attribute, DirectAttribute):<EOL><INDENT>direct_attributes.append(attribute)<EOL>if hasattr(attribute, '<STR_LIT>'):<EOL><INDENT>render_attributes.append(attribute)<EOL><DEDENT>if not hasattr(attribute, '<STR_LIT>'):<EOL><INDENT>attribute.object_attribute = '<STR_LIT>'.format(attribute_name)<EOL><DEDENT>if getattr(attribute, '<STR_LIT>', False):<EOL><INDENT>init_attributes.append(attribute_name)<EOL><DEDENT><DEDENT>if isinstance(attribute, (BlokAttribute, NestedBlokAttribute)) and hasattr(attribute.type, '<STR_LIT>'):<EOL><INDENT>blok_attributes[attribute.type.tag] = attribute<EOL><DEDENT>if isinstance(attribute, AccessorAttribute):<EOL><INDENT>accessor_attributes.append(attribute)<EOL>if not hasattr(attribute, '<STR_LIT>'):<EOL><INDENT>attribute.parent_attribute = '<STR_LIT>'.format(attribute_name)<EOL><DEDENT><DEDENT>attribute_map[attribute.name] = attribute_name<EOL><DEDENT>if direct_attributes and not name == '<STR_LIT>' and '<STR_LIT>' in class_dict:<EOL><INDENT>class_dict['<STR_LIT>'] += tuple(attribute.object_attribute for attribute in direct_attributes)<EOL>class_dict['<STR_LIT>'] += tuple(attribute.parent_attribute for attribute in accessor_attributes)<EOL><DEDENT>if render_attributes:<EOL><INDENT>if hasattr(parents[<NUM_LIT:0>], '<STR_LIT>'):<EOL><INDENT>render_attributes = list(parents[<NUM_LIT:0>].render_attributes) + render_attributes<EOL><DEDENT>class_dict['<STR_LIT>'] = set(render_attributes)<EOL><DEDENT>if init_attributes:<EOL><INDENT>if hasattr(parents[<NUM_LIT:0>], '<STR_LIT>'):<EOL><INDENT>init_attributes = list(parents[<NUM_LIT:0>].init_attributes) + init_attributes<EOL><DEDENT>class_dict['<STR_LIT>'] = init_attributes<EOL><DEDENT>if blok_attributes:<EOL><INDENT>if hasattr(parents[<NUM_LIT:0>], '<STR_LIT>'):<EOL><INDENT>full_blok_attributes = dict(parents[<NUM_LIT:0>].blok_attributes)<EOL>full_blok_attributes.update(blok_attributes)<EOL>blok_attributes = full_blok_attributes<EOL><DEDENT>class_dict['<STR_LIT>'] = blok_attributes<EOL><DEDENT>if attribute_map:<EOL><INDENT>if hasattr(parents[<NUM_LIT:0>], '<STR_LIT>'):<EOL><INDENT>full_attribute_map = dict(parents[<NUM_LIT:0>].attribute_map)<EOL>full_attribute_map.update(attribute_map)<EOL>attribute_map = full_attribute_map<EOL><DEDENT>class_dict['<STR_LIT>'] = attribute_map<EOL><DEDENT>class_dict['<STR_LIT>'] = attributes<EOL>attribute_signals = (attribute.signal for attribute in attributes.values() if getattr(attribute, '<STR_LIT>'))<EOL>if attribute_signals:<EOL><INDENT>class_dict['<STR_LIT>'] = class_dict.get('<STR_LIT>', ()) + tuple(attribute_signals)<EOL><DEDENT><DEDENT>return super(TagAttributes, metaclass).__new__(metaclass, name, parents, class_dict, *kargs, **kwargs)<EOL>
Updates a tag class to automatically register all signals