From 9cf32bc3d3851bc9db43a9b59662dd37c6ef3137 Mon Sep 17 00:00:00 2001 From: xunbu Date: Wed, 31 Dec 2025 22:45:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=B1=BB=E5=9E=8B=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docutranslate/workflow/docx_workflow.py | 2 +- docutranslate/workflow/json_workflow.py | 2 +- docutranslate/workflow/pptx_workflow.py | 2 +- docutranslate/workflow/xlsx_workflow.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docutranslate/workflow/docx_workflow.py b/docutranslate/workflow/docx_workflow.py index aca9daf..8eaaa97 100644 --- a/docutranslate/workflow/docx_workflow.py +++ b/docutranslate/workflow/docx_workflow.py @@ -64,7 +64,7 @@ class DocxWorkflow(Workflow[DocxWorkflowConfig, Document, Document], HTMLExporta return docu.content def save_as_html(self, name: str = None, output_dir: Path | str = "./output", - config: Docx2HTMLExporter | None = None) -> Self: + config: Docx2HTMLExporterConfig | None = None) -> Self: config = config or self.config.html_exporter_config self._save(exporter=Docx2HTMLExporter(config), name=name, output_dir=output_dir) return self diff --git a/docutranslate/workflow/json_workflow.py b/docutranslate/workflow/json_workflow.py index d374284..6fd0f6f 100644 --- a/docutranslate/workflow/json_workflow.py +++ b/docutranslate/workflow/json_workflow.py @@ -61,7 +61,7 @@ class JsonWorkflow(Workflow[JsonWorkflowConfig, Document, Document], HTMLExporta return docu.content.decode() def save_as_html(self, name: str = None, output_dir: Path | str = "./output", - config: Json2HTMLExporter | None = None) -> Self: + config: Json2HTMLExporterConfig | None = None) -> Self: config = config or self.config.html_exporter_config self._save(exporter=Json2HTMLExporter(config), name=name, output_dir=output_dir) return self diff --git a/docutranslate/workflow/pptx_workflow.py b/docutranslate/workflow/pptx_workflow.py index ec49001..0ce4c19 100644 --- a/docutranslate/workflow/pptx_workflow.py +++ b/docutranslate/workflow/pptx_workflow.py @@ -64,7 +64,7 @@ class PPTXWorkflow(Workflow[PPTXWorkflowConfig, Document, Document], HTMLExporta return docu.content def save_as_html(self, name: str = None, output_dir: Path | str = "./output", - config: PPTX2HTMLExporter | None = None) -> Self: + config: PPTX2HTMLExporterConfig | None = None) -> Self: config = config or self.config.html_exporter_config self._save(exporter=PPTX2HTMLExporter(config), name=name, output_dir=output_dir) return self diff --git a/docutranslate/workflow/xlsx_workflow.py b/docutranslate/workflow/xlsx_workflow.py index ae3f06d..4a48cca 100644 --- a/docutranslate/workflow/xlsx_workflow.py +++ b/docutranslate/workflow/xlsx_workflow.py @@ -90,7 +90,7 @@ class XlsxWorkflow(Workflow[XlsxWorkflowConfig, Document, Document], HTMLExporta return docu.content def save_as_html(self, name: str = None, output_dir: Path | str = "./output", - config: Xlsx2HTMLExporter | None = None) -> Self: + config: Xlsx2HTMLExporterConfig | None = None) -> Self: config = config or self.config.html_exporter_config self._save(exporter=Xlsx2HTMLExporter(config), name=name, output_dir=output_dir) return self