sugarsdk/modval.py
def _get_runner_implementations(self, ifc, uri):
        """
        Get parsed runner implementations source.

        :param uri:
        :return:
        """
        for node in ifc["interface"].body:
            if isinstance(node, astroid.ClassDef):
                ifc = node
                break
        imps = {ifc: []}
        imp_path = os.path.join(self._runner_module_loader.root_path, os.path.sep.join(uri.split(".")), "_impl")
        for fname in os.listdir(imp_path):
            if fname.startswith("_"):
                continue
            with sugar.utils.files.fopen(os.path.join(imp_path, fname)) as src_h:
                parsed = astroid.parse(src_h.read())
                for node in parsed.body:
                    if isinstance(node, astroid.ClassDef):
                        for node_base in node.bases:
                            if node_base.name == ifc.name:
                                imps[ifc].append((node, fname))
        return imps

        Get parsed runner implementations source.

        :param uri:
        :return:
        
Get parsed runner implementations source.
Get parsed runner implementations source .
def _get_runner_implementations(self, ifc, uri):
        for node in ifc["interface"].body:
            if isinstance(node, astroid.ClassDef):
                ifc = node
                break
        imps = {ifc: []}
        imp_path = os.path.join(self._runner_module_loader.root_path, os.path.sep.join(uri.split(".")), "_impl")
        for fname in os.listdir(imp_path):
            if fname.startswith("_"):
                continue
            with sugar.utils.files.fopen(os.path.join(imp_path, fname)) as src_h:
                parsed = astroid.parse(src_h.read())
                for node in parsed.body:
                    if isinstance(node, astroid.ClassDef):
                        for node_base in node.bases:
                            if node_base.name == ifc.name:
                                imps[ifc].append((node, fname))
        return imps
def _get_runner_implementations ( self , ifc , uri ) : for node in ifc [ "interface" ] . body : if isinstance ( node , astroid . ClassDef ) : ifc = node break imps = { ifc : [ ] } imp_path = os . path . join ( self . _runner_module_loader . root_path , os . path . sep . join ( uri . split ( "." ) ) , "_impl" ) for fname in os . listdir ( imp_path ) : if fname . startswith ( "_" ) : continue with sugar . utils . files . fopen ( os . path . join ( imp_path , fname ) ) as src_h : parsed = astroid . parse ( src_h . read ( ) ) for node in parsed . body : if isinstance ( node , astroid . ClassDef ) : for node_base in node . bases : if node_base . name == ifc . name : imps [ ifc ] . append ( ( node , fname ) ) return imps
Get parsed runner implementations source.
Get parsed runner implementations source .
"""
        Get parsed runner implementations source.

        :param uri:
        :return:
        """
None
self
ifc
uri
None