xtuml/consistency_check.py
def pretty_to_link(inst, link):
    '''
    Create a human-readable representation of a link on the 'TO'-side
    '''
    values = ''
    prefix = ''
    metaclass = xtuml.get_metaclass(inst)

    for name, ty in metaclass.attributes:
        if name in link.key_map:
            value = getattr(inst, name)
            value = xtuml.serialize_value(value, ty)
            name = link.key_map[name]
            values += '%s%s=%s' % (prefix, name, value)
            prefix = ', '
                
    return '%s(%s)' % (link.kind, values)
def pretty_to_link(inst, link):
    '''
    Create a human-readable representation of a link on the 'TO'-side
    '''
    values = ''
    prefix = ''
    metaclass = xtuml.get_metaclass(inst)

    for name, ty in metaclass.attributes:
        if name in link.key_map:
            value = getattr(inst, name)
            value = xtuml.serialize_value(value, ty)
            name = link.key_map[name]
            values += '%s%s=%s' % (prefix, name, value)
            prefix = ', '
                
    return '%s(%s)' % (link.kind, values)
def pretty_to_link ( inst , link ) : values = '' prefix = '' metaclass = xtuml . get_metaclass ( inst ) for name , ty in metaclass . attributes : if name in link . key_map : value = getattr ( inst , name ) value = xtuml . serialize_value ( value , ty ) name = link . key_map [ name ] values += '%s%s=%s' % ( prefix , name , value ) prefix = ', ' return '%s(%s)' % ( link . kind , values )
Create a human-readable representation of a link on the 'TO'-side
Create a human - readable representation of a link on the TO - side