(self, template_path: Path, output_path: Path, **data)
| 34 | self.base_output_path = base_output_path |
| 35 | |
| 36 | def render_template(self, template_path: Path, output_path: Path, **data): |
| 37 | # jinja expects a string, representing a relative path with forward slashes |
| 38 | template_path_str = str(template_path.relative_to(TEMPLATE_DIR)).replace("\\", "/") |
| 39 | template = JINJA_ENV.get_template(template_path_str) |
| 40 | |
| 41 | output = template.render(**data) |
| 42 | |
| 43 | with output_path.open(mode="w", encoding="utf-8") as output_file: |
| 44 | output_file.write(output) |
| 45 | |
| 46 | def render_attribute_classes(self, template_path: Path, data_path: Path, output_path: Path): |
| 47 | with data_path.open() as data_file: |
no outgoing calls
no test coverage detected