Update path to paths in FileComponent

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-03-21 17:08:08 -03:00
commit 8f88db0c2e

View file

@ -11,8 +11,8 @@ class FileComponent(CustomComponent):
def build_config(self) -> Dict[str, Any]: def build_config(self) -> Dict[str, Any]:
return { return {
"path": { "paths": {
"display_name": "Path", "display_name": "Paths",
"field_type": "file", "field_type": "file",
"file_types": TEXT_FILE_TYPES, "file_types": TEXT_FILE_TYPES,
"info": f"Supported file types: {', '.join(TEXT_FILE_TYPES)}", "info": f"Supported file types: {', '.join(TEXT_FILE_TYPES)}",
@ -39,7 +39,7 @@ class FileComponent(CustomComponent):
self, self,
paths: List[str], paths: List[str],
silent_errors: bool = False, silent_errors: bool = False,
) -> Record: ) -> List[Record]:
records = [self.load_file(path, silent_errors) for path in paths] records = [self.load_file(path, silent_errors) for path in paths]
self.status = records self.status = records
return records return records