(module_name: str, template_dirs: list[str])
| 575 | |
| 576 | |
| 577 | def read_module_plain_source(module_name: str, template_dirs: list[str]) -> str: |
| 578 | plain_source_text = file_utils.open_from(template_dirs, module_name + PLAIN_SOURCE_FILE_EXTENSION) |
| 579 | if plain_source_text is None: |
| 580 | raise ModuleDoesNotExistError(f"Module does not exist ({module_name}).") |
| 581 | |
| 582 | blob = find_large_base64_blob(plain_source_text) |
| 583 | if blob is not None: |
| 584 | raise UnsupportedBase64Content( |
| 585 | f"Module '{module_name}' contains a base64-encoded blob ({len(blob)} characters) " |
| 586 | "inlined in the specification. This is not supported." |
| 587 | "Remove the base64 data from the .plain file or if necessary," |
| 588 | "include the binary file path in the specification." |
| 589 | ) |
| 590 | |
| 591 | return plain_source_text |
| 592 | |
| 593 | |
| 594 | def parse_plain_file( |
no test coverage detected