Draft: Remove py2 references

This commit is contained in:
Chris Hennes
2022-11-07 22:13:41 -06:00
committed by Uwe
parent a64fef50bc
commit a4bb55a34e
3 changed files with 3 additions and 79 deletions

View File

@@ -53,20 +53,6 @@ def _get_text_techdraw(text, tcolor, fontsize, anchor,
_t = _t.replace("<", "&lt;")
t = _t.replace(">", "&gt;")
# TODO: remove when Python 2 is no longer supported
if six.PY2 and not isinstance(t, six.text_type):
t = t.decode("utf8")
# possible workaround if UTF8 is unsupported
# import unicodedata as U
# v = list()
# for c in U.normalize("NFKD", t):
# if not U.combining(c):
# v.append(c)
#
# t = u"".join(v)
# t = t.encode("utf8")
svg += '<text '
svg += 'stroke-width="0" stroke="{}" '.format(tcolor)
svg += 'fill="{}" font-size="{}" '.format(tcolor, fontsize)