@property<EOL><INDENT>def attr___subclasses__(self):<DEDENT>
from astroid import bases<EOL>from astroid import scoped_nodes<EOL>if not self._instance.newstyle:<EOL><INDENT>raise exceptions.AttributeInferenceError(<EOL>target=self._instance, attribute="<STR_LIT>"<EOL>)<EOL><DEDENT>qname = self._instance.qname()<EOL>root = self._instance.root()<EOL>classes = [<EOL>cls<EOL>for cls in root.nodes_of_class(scoped_nodes.ClassDef)<EOL>if cls != self._instance and cls.is_subtype_of(qname)<EOL>]<EOL>obj = node_classes.List(parent=self._instance)<EOL>obj.postinit(classes)<EOL>class SubclassesBoundMethod(bases.BoundMethod):<EOL><INDENT>def infer_call_result(self, caller, context=None):<EOL><INDENT>yield obj<EOL><DEDENT><DEDENT>implicit_metaclass = self._instance.implicit_metaclass()<EOL>subclasses_method = implicit_metaclass.locals["<STR_LIT>"][<NUM_LIT:0>]<EOL>return SubclassesBoundMethod(proxy=subclasses_method, bound=implicit_metaclass)<EOL>
Get the subclasses of the underlying class

        This looks only in the current module for retrieving the subclasses,
        thus it might miss a couple of them.