def column_type_str(column):
 type_ = column.type
 if (type(type_) in (types.Integer, types.SmallInteger)):
  return 'int'
 if (type(type_) == types.Boolean):
  return 'bool'
 if (type(type_) == types.Unicode):
  return (u'unicode \u2013 %s' % column.info['format'])
 if (type(type_) == types.UnicodeText):
  return (u'unicode \u2013 %s' % column.info['format'])
 if (type(type_) == types.Enum):
  return ('enum: [%s]' % ', '.join(type_.enums))
 if (type(type_) == markdown.MarkdownColumn):
  return 'markdown'
 raise ValueError(repr(type_))

def column_type_str ( column ) : type_ = column . type if ( type ( type_ ) in ( types . Integer , types . SmallInteger ) ) : return 'int' if ( type ( type_ ) == types . Boolean ) : return 'bool' if ( type ( type_ ) == types . Unicode ) : return ( u'unicode \u2013 %s' % column . info [ 'format' ] ) if ( type ( type_ ) == types . UnicodeText ) : return ( u'unicode \u2013 %s' % column . info [ 'format' ] ) if ( type ( type_ ) == types . Enum ) : return ( 'enum: [%s]' % ', ' . join ( type_ . enums ) ) if ( type ( type_ ) == markdown . MarkdownColumn ) : return 'markdown' raise ValueError ( repr ( type_ ) )
extract the type name from a sqla column .