(self, node)
Include file referenced at node.
Include file referenced at node.
Include file referenced at node .
def construct_include(self, node):
        """Include file referenced at node."""
        filename = os.path.abspath(
            os.path.join(self._root, self.construct_scalar(node)))
        extension = os.path.splitext(filename)[1].lstrip('.')
        with open(filename, 'r') as f:
            if extension in ('yaml', 'yml'):
                return yaml.load(f, Loader)
            else:
                return ''.join(f.readlines())
def construct_include ( self , node ) : filename = os . path . abspath ( os . path . join ( self . _root , self . construct_scalar ( node ) ) ) extension = os . path . splitext ( filename ) [ 1 ] . lstrip ( '.' ) with open ( filename , 'r' ) as f : if extension in ( 'yaml' , 'yml' ) : return yaml . load ( f , Loader ) else : return '' . join ( f . readlines ( ) )