Add pylatexenc to exceptions list

This commit is contained in:
Rafael Teixeira de Lima 2025-01-27 10:22:28 +01:00
parent 9b5e482d1e
commit b3bf971eb0
2 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,7 @@ On 23/01/2025
"""
import lxml.etree as ET
import pylatexenc # type: ignore
from pylatexenc.latexencode import UnicodeToLatexEncoder
from docling.backend.docx_latex.latex_dict import (
ALN,
@ -177,7 +177,7 @@ class oMath2Latex(Tag2Method):
_t_dict = T
__direct_tags = ("box", "sSub", "sSup", "sSubSup", "num", "den", "deg", "e")
u = pylatexenc.latexencode.UnicodeToLatexEncoder(
u = UnicodeToLatexEncoder(
replacement_latex_protection="braces-all",
unknown_char_policy="keep",
unknown_char_warning=False,

View File

@ -156,7 +156,8 @@ module = [
"deepsearch_glm.*",
"lxml.*",
"bs4.*",
"huggingface_hub.*"
"huggingface_hub.*",
"pylatexenc.*"
]
ignore_missing_imports = true