(folder_path: Text, recursive: bool = True)
return file_list
load folder path, return all files endswith .yml/.yaml/.json/_test.py in list.

    Args:
        folder_path (str): specified folder path to load
        recursive (bool): load files recursively if True

    Returns:
        list: files endswith yml/yaml/json
load folder path, return all files endswith .yml/.yaml/.json/_test.py in list.
load folder path return all files endswith . yml / . yaml / . json / _test . py in list .
def load_folder_files(folder_path: Text, recursive: bool = True) -> List:
    """ load folder path, return all files endswith .yml/.yaml/.json/_test.py in list.

    Args:
        folder_path (str): specified folder path to load
        recursive (bool): load files recursively if True

    Returns:
        list: files endswith yml/yaml/json
    """
    if isinstance(folder_path, (list, set)):
        files = []
        for path in set(folder_path):
            files.extend(load_folder_files(path, recursive))

        return files

    if not os.path.exists(folder_path):
        return []

    file_list = []

    for dirpath, dirnames, filenames in os.walk(folder_path):
        filenames_list = []

        for filename in filenames:
            if not filename.lower().endswith((".yml", ".yaml", ".json", "_test.py")):
                continue

            filenames_list.append(filename)

        for filename in filenames_list:
            file_path = os.path.join(dirpath, filename)
            file_list.append(file_path)

        if not recursive:
            break

    return file_list
def load_folder_files ( folder_path : Text , recursive : bool = True ) -> List : if isinstance ( folder_path , ( list , set ) ) : files = [ ] for path in set ( folder_path ) : files . extend ( load_folder_files ( path , recursive ) ) return files if not os . path . exists ( folder_path ) : return [ ] file_list = [ ] for dirpath , dirnames , filenames in os . walk ( folder_path ) : filenames_list = [ ] for filename in filenames : if not filename . lower ( ) . endswith ( ( ".yml" , ".yaml" , ".json" , "_test.py" ) ) : continue filenames_list . append ( filename ) for filename in filenames_list : file_path = os . path . join ( dirpath , filename ) file_list . append ( file_path ) if not recursive : break return file_list