some manual py2 cleanups

This commit is contained in:
Anthony Sottile
2020-01-08 21:23:18 -08:00
parent 30c1e8289f
commit ab19b94811
23 changed files with 31 additions and 59 deletions

View File

@@ -1,6 +1,3 @@
import six
def to_text(s):
return s if isinstance(s, str) else s.decode('UTF-8')
@@ -9,4 +6,4 @@ def to_bytes(s):
return s if isinstance(s, bytes) else s.encode('UTF-8')
n = to_bytes if six.PY2 else to_text
n = to_text