def parse_params()

in src/pydolphinscheduler/core/yaml_workflow.py [0:0]


    def parse_params(self, params: Any, key_path=""):
        """Recursively resolves the parameter values.

        The function operates params only when it encounters a string; other types continue recursively.
        """
        if isinstance(params, str):
            for parse_rule in self._parse_rules:
                params_ = params
                params = parse_rule(
                    params, base_folder=self._base_folder, key_path=key_path
                )
                if params_ != params:
                    logger.info(f"parse {params_} -> {params}")

        elif isinstance(params, list):
            for index in range(len(params)):
                params[index] = self.parse_params(params[index], key_path)

        elif isinstance(params, dict):
            for key, value in params.items():
                if not key_path:
                    new_key_path = key
                else:
                    new_key_path = key_path + Symbol.POINT + key
                params[key] = self.parse_params(value, new_key_path)

        return params