Skip to content

Commit

Permalink
Remove Python 2 workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhers committed Dec 15, 2020
1 parent b6de4cd commit 1e09984
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tupa/scripts/conll18_ud_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ class UDError(Exception):

# Conversion methods handling `str` <-> `unicode` conversions in Python2
def _decode(text):
return text if sys.version_info[0] >= 3 or not isinstance(text, str) else text.decode("utf-8")
return text


def _encode(text):
return text if sys.version_info[0] >= 3 or not isinstance(text, unicode) else text.encode("utf-8")
return text


# Load given CoNLL-U file into internal representation
Expand Down

0 comments on commit 1e09984

Please sign in to comment.