|
26 | 26 | from docxtpl import DocxTemplate |
27 | 27 | from jinja2 import Environment |
28 | 28 |
|
29 | | -from docx_generator.adapters.docx.style_adapter import RenderStylesCollection, get_document_render_styles, _BEGIN_STYLE, _END_STYLE, _TAG_STYLE |
| 29 | +from docx_generator.adapters.docx.style_adapter import RenderStylesCollection, get_document_render_styles |
30 | 30 | from docx_generator.adapters.mistletoe.DocxRenderer import DocxRenderer |
31 | 31 | from docx_generator.exceptions.rendering_error import RenderingError |
32 | 32 | from docx_generator.filters.filters import Filters |
@@ -138,9 +138,10 @@ def generate_docx(self, base_path: str, template_path: str, data: Dict, output_p |
138 | 138 | full_template_path = self._process_template_path(processed_base_path, template_path) |
139 | 139 | full_output_path = self._process_output_path(processed_base_path, output_path) |
140 | 140 |
|
141 | | - if self._image_handler != None: |
| 141 | + if self._image_handler is not None: |
142 | 142 | self._image_handler.set_base_path(processed_base_path) |
143 | 143 | self._image_handler.set_output_path(os.path.join(os.path.dirname(full_output_path), "images")) |
144 | 144 |
|
145 | | - self._logger.info('Starting new report generation. Base path: {}. Template path: {}. Output path'.format(processed_base_path, full_template_path, full_output_path)) |
| 145 | + self._logger.info(f'Starting new report generation. Base path: {processed_base_path}. ' |
| 146 | + f'Template path: {full_template_path}. Output path {full_output_path}') |
146 | 147 | self._recursive_rendering(processed_base_path, full_template_path, data, full_output_path, 0) |
0 commit comments