(path: str, filetype: str = '.pdf')
| 24 | class DocumentLoader: |
| 25 | @staticmethod |
| 26 | def get_files(path: str, filetype: str = '.pdf') -> Iterator[str]: |
| 27 | try: |
| 28 | yield from [ |
| 29 | file_name for file_name in os.listdir(f'{path}') |
| 30 | if file_name.endswith(filetype) |
| 31 | ] |
| 32 | except FileNotFoundError as e: |
| 33 | print(f'\033[31m{e}') |
| 34 | |
| 35 | @staticmethod |
| 36 | def load_documents( |
nothing calls this directly
no outgoing calls
no test coverage detected