pypet/naturalnaming.py
def _determine_types(start_node, first_name, add_leaf, add_link):
        """Determines types for generic additions"""
        if start_node.v_is_root:
            where = first_name
        else:
            where = start_node._branch

        if where in SUBTREE_MAPPING:
            type_tuple = SUBTREE_MAPPING[where]
        else:
            type_tuple = (GROUP, LEAF)

        if add_link:
            return type_tuple[0], LINK
        if add_leaf:
            return type_tuple
        else:
            return type_tuple[0], type_tuple[0]
def _determine_types(start_node, first_name, add_leaf, add_link):
        if start_node.v_is_root:
            where = first_name
        else:
            where = start_node._branch

        if where in SUBTREE_MAPPING:
            type_tuple = SUBTREE_MAPPING[where]
        else:
            type_tuple = (GROUP, LEAF)

        if add_link:
            return type_tuple[0], LINK
        if add_leaf:
            return type_tuple
        else:
            return type_tuple[0], type_tuple[0]
def _determine_types ( start_node , first_name , add_leaf , add_link ) : if start_node . v_is_root : where = first_name else : where = start_node . _branch if where in SUBTREE_MAPPING : type_tuple = SUBTREE_MAPPING [ where ] else : type_tuple = ( GROUP , LEAF ) if add_link : return type_tuple [ 0 ] , LINK if add_leaf : return type_tuple else : return type_tuple [ 0 ] , type_tuple [ 0 ]
Determines types for generic additions
Determines types for generic additions