修复类型提示错误

This commit is contained in:
xunbu
2025-12-31 22:45:45 +08:00
parent a2f70a66ea
commit 9cf32bc3d3
4 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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