Skip to content

Commit

Permalink
Remove py2 flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Teixeira de Lima committed Jan 23, 2025
1 parent 9904bd2 commit 0349aeb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions docling/backend/docx_latex/omml.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
)

OMML_NS = "{http://schemas.openxmlformats.org/officeDocument/2006/math}"
PY2 = False


def load(stream):
Expand Down Expand Up @@ -156,8 +155,6 @@ def do_common(self, elm):
stag = elm.tag.replace(OMML_NS, "")
if stag in self.__val_tags:
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
return None

Expand Down Expand Up @@ -204,7 +201,7 @@ def process_unknow(self, elm, stag):

@property
def latex(self):
return self._latex if not PY2 else self._latex.encode("utf-8")
return self._latex

def do_acc(self, elm):
"""
Expand Down

0 comments on commit 0349aeb

Please sign in to comment.