mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-30 22:14:37 +00:00
added proper typing for mypy
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
This commit is contained in:
parent
b8f1439880
commit
bc31f2a973
@ -76,8 +76,7 @@ class MsExcelDocumentBackend(DeclarativeDocumentBackend):
|
||||
|
||||
origin = DocumentOrigin(
|
||||
filename=self.file.name or "file",
|
||||
# mimetype="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
mimetype="application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
mimetype="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
binary_hash=self.document_hash,
|
||||
)
|
||||
|
||||
|
@ -32,7 +32,7 @@ class InputFormat(str, Enum):
|
||||
PDF = "pdf"
|
||||
ASCIIDOC = "asciidoc"
|
||||
MD = "md"
|
||||
EXCEL = "excel"
|
||||
XLSX = "xlsx"
|
||||
|
||||
|
||||
class OutputFormat(str, Enum):
|
||||
@ -50,7 +50,7 @@ FormatToExtensions: Dict[InputFormat, List[str]] = {
|
||||
InputFormat.HTML: ["html", "htm", "xhtml"],
|
||||
InputFormat.IMAGE: ["jpg", "jpeg", "png", "tif", "tiff", "bmp"],
|
||||
InputFormat.ASCIIDOC: ["adoc", "asciidoc", "asc"],
|
||||
InputFormat.EXCEL: ["xlsx"],
|
||||
InputFormat.XLSX: ["xlsx"],
|
||||
}
|
||||
|
||||
FormatToMimeType: Dict[InputFormat, List[str]] = {
|
||||
@ -74,7 +74,7 @@ FormatToMimeType: Dict[InputFormat, List[str]] = {
|
||||
InputFormat.PDF: ["application/pdf"],
|
||||
InputFormat.ASCIIDOC: ["text/asciidoc"],
|
||||
InputFormat.MD: ["text/markdown", "text/x-markdown"],
|
||||
InputFormat.EXCEL: [
|
||||
InputFormat.XLSX: [
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
],
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user