Codestyling

This commit is contained in:
Eric Lapouyade 2021-10-01 08:31:19 +02:00
parent d900f9296a
commit b0a5de05aa
2 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,5 @@
import argparse, json
import argparse
import json
from pathlib import Path
from .template import DocxTemplate, TemplateError
@ -109,7 +110,7 @@ def render_docx(doc:DocxTemplate, json_data: dict) -> DocxTemplate:
doc.render(json_data)
return doc
except TemplateError as e:
raise RuntimeError(f'An error ocurred while trying to render the docx') from e
raise RuntimeError('An error ocurred while trying to render the docx') from e
def save_file(doc: DocxTemplate, parsed_args: dict) -> None:

View File

@ -1,4 +1,4 @@
import sys, os
import os
from pathlib import Path
TEMPLATE_PATH = 'templates/module_execute_tpl.docx'
@ -19,4 +19,3 @@ os.system(cmd)
if output_path.exists():
print(f' --> File {output_path.resolve()} has been generated.')