Return a list containing pyclass definition.
186849
def getPyClassDefinition(self):
        '''
        '''
        kw = KW.copy()
        
        # --> EXTENDED
        if self.hasExtPyClass():
            classInfo = self.extPyClasses[self.name]
            kw['classInfo'] = classInfo[0]
            return ["%(ID3)simport %(classInfo)s" %kw ]
        # <--
        
        kw['pyclass'] = self.getPyClass()
        definition = []
        definition.append('%(ID3)sclass %(pyclass)s:' %kw)
        if self.metaclass is not None:
            kw['type'] = self.metaclass
            definition.append('%(ID4)s__metaclass__ = %(type)s' %kw)
        definition.append('%(ID4)stypecode = self' %kw)
        
        #TODO: Remove pyclass holder __init__ -->
        definition.append('%(ID4)sdef __init__(self):' %kw)
        definition.append('%(ID5)s# pyclass' %kw)

        # JRB HACK need to call _setElements via getElements
        self._setUpElements()
        
        # JRB HACK need to indent additional one level
        for el in self.elementAttrs:
            kw['element'] = el
            definition.append('%(ID2)s%(element)s' %kw)
        definition.append('%(ID5)sreturn' %kw)
        # <--
        
        # pyclass descriptive name
        if self.name is not None:
            kw['name'] = self.name
            definition.append(\
                '%(ID3)s%(pyclass)s.__name__ = "%(name)s_Holder"' %kw
                )

        return definition
1091579
def class_variables(self):
        
        p = lambda o: isinstance(o, Variable) and self.module._docfilter(o)
        return filter(p, self.doc.values())
1362868
def get_all_classes(module_name):
    """"""
    module = importlib.import_module(module_name)
    return getmembers(module, lambda m: isclass(m) and not isabstract(m))
518930
def get_python_list(scala_list):
    """"""
    python_list = []
    for i in range(scala_list.length()):
        python_list.append(scala_list.apply(i))
    return python_list
637545
def obj_classes_from_module(module):
    """"""
    for name in dir(module):
        if not name.startswith('_'):
            cls = getattr(module, name)
            if getattr(cls, 'classID', None):
                yield (name, cls)
640100
def all_subclasses(cls):
    
    subclasses = cls.__subclasses__() 
    return subclasses + [g for s in subclasses for g in all_subclasses(s)]
85210
def _as_list(obj):
    """"""
    if obj is None:
        return None
    elif isinstance(obj, string_types):
        return [obj]
    elif isinstance(obj, tuple):
        return list(obj)
    elif not hasattr(obj, '__len__'):
        return [obj]
    else:
        return obj
1182804
def sphinx_class(self):
        """"""
        classdoc = ':class:`{cls} <{pref}.{cls}>`'.format(
            cls=self.instance_class.__name__,
            pref=self.instance_class.__module__,
        )
        return classdoc
298239
def ListOf(cls, **kwargs):
    """"""

    def _list_load(value):
        return [cls.load(d) for d in value]

    return Property(types=list, load=_list_load, default=list, **kwargs)
1295402
def extract_type(s):
    """"""
    r = re.compile(r"<class '(.*)'>", re.MULTILINE | re.IGNORECASE)
    try:
        m = r.match(str(s)).group(1)
    except (IndexError, AttributeError) as e:
        m = None

    return m
788759
def subclasses(cls):
        """"""
        seen = set()
        queue = set([cls])

        while queue:
            c = queue.pop()
            seen.add(c)

            sc = c.__subclasses__()
            for c in sc:
                if c not in seen:
                    queue.add(c)

        seen.remove(cls)
        return seen
1358901
def get_list_class(context, list):
    
    return "list_%s_%s" % (list.model._meta.app_label, list.model._meta.model_name)
1276948
def sphinx_class(self):
        """"""
        classdoc = ':class:`{cls} <{pref}.{cls}>`'
        if self.__module__.split('.')[0] == 'properties':
            pref = 'properties'
        else:
            pref = text_type(self.__module__)
        return classdoc.format(cls=self.__class__.__name__, pref=pref)
31281
def get_suitable_vis_classes(obj):
    """"""

    ret = []
    for class_ in classes_vis():
        if isinstance(obj, class_.input_classes):
            ret.append(class_)
    return ret
808894
def _import_classes(self, class_names):
        
        classes = []
        for name in class_names:
            classes.extend(self._import_class_or_module(name))
        return classes
1305604
def with_class(self, cls):
        
        rcls = []
        for key, value in self._classification.items():
            if value[0] == cls:
                rcls.append(key)
        return rcls
1313824
def class_types(self):
        """"""

        if None is self.__class_types:
            self.__class_types = []
            for type_ in self.argument_types:
                decl = None
                type_ = type_traits.remove_reference(type_)
                if type_traits_classes.is_class(type_):
                    decl = type_traits_classes.class_traits.get_declaration(
                        type_)
                elif type_traits_classes.is_class_declaration(type_):
                    tt = type_traits_classes.class_declaration_traits
                    decl = tt.get_declaration(type_)
                else:
                    pass
                if decl:
                    self.__class_types.append(decl)
        return self.__class_types