def is_valid_local_config_source(path: str) -> bool: # TODO: this function must be refactored before 1.0 (Han 12.22) try: from jina.jaml import parse_config_source parse_config_source(path) return True except FileNotFoundError: return False
def is_valid_local_config_source(path: str) -> bool: # TODO: this function must be refactored before 1.0 (Han 12.22) """ Check if the path is valid. :param path: Local file path. :return: True if the path is valid else False. """ try: from jina.jaml import parse_config_source parse_config_source(path) return True except FileNotFoundError: return False