修复类型提示错误
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user