mirror of
				https://github.com/avatao-content/baseimage-tutorial-framework
				synced 2025-11-04 06:12:54 +00:00 
			
		
		
		
	Add docstrings to YamlFSM
This commit is contained in:
		@@ -13,7 +13,17 @@ from tfw.fsm.fsm_base import FSMBase
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class YamlFSM(FSMBase):
 | 
			
		||||
    """
 | 
			
		||||
    This is a state machine capable of building itself from a YAML config file.
 | 
			
		||||
    """
 | 
			
		||||
    def __init__(self, config_file, jinja2_variables=None):
 | 
			
		||||
        """
 | 
			
		||||
        :param config_file: path of the YAML file
 | 
			
		||||
        :param jinja2_variables: dict containing jinja2 variables
 | 
			
		||||
                                 or str with filename of YAML file to
 | 
			
		||||
                                 parse and use as dict.
 | 
			
		||||
                                 jinja2 support is disabled if this is None
 | 
			
		||||
        """
 | 
			
		||||
        self.config = ConfigParser(config_file, jinja2_variables).config
 | 
			
		||||
        self.setup_states()
 | 
			
		||||
        super().__init__()  # FSMBase.__init__() requires states
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user