Remove py2 flag

This commit is contained in:
Rafael Teixeira de Lima 2025-01-23 17:30:47 +01:00
parent 9904bd25a1
commit 0349aebb52

View File

@ -37,7 +37,6 @@ from docling.backend.docx_latex.latex_dict import (
) )
OMML_NS = "{http://schemas.openxmlformats.org/officeDocument/2006/math}" OMML_NS = "{http://schemas.openxmlformats.org/officeDocument/2006/math}"
PY2 = False
def load(stream): def load(stream):
@ -156,8 +155,6 @@ class Pr(Tag2Method):
stag = elm.tag.replace(OMML_NS, "") stag = elm.tag.replace(OMML_NS, "")
if stag in self.__val_tags: if stag in self.__val_tags:
t = elm.get("{0}val".format(OMML_NS)) t = elm.get("{0}val".format(OMML_NS))
if PY2 and (t != None):
t = t if isinstance(t, unicode) else unicode(t, "utf-8")
self.__innerdict[stag] = t self.__innerdict[stag] = t
return None return None
@ -204,7 +201,7 @@ class oMath2Latex(Tag2Method):
@property @property
def latex(self): def latex(self):
return self._latex if not PY2 else self._latex.encode("utf-8") return self._latex
def do_acc(self, elm): def do_acc(self, elm):
""" """