[tools] Remove py2 remains

This commit is contained in:
Ebrahim Byagowi 2020-03-18 23:40:59 +03:30
parent 2e29a4077b
commit a0c58be371
3 changed files with 1 additions and 15 deletions

View File

@ -8,11 +8,6 @@ import io
import re import re
import sys import sys
try:
reload(sys)
sys.setdefaultencoding('utf-8')
except NameError:
pass # Python 3
print ("""static OS2Range _hb_os2_unicode_ranges[] = print ("""static OS2Range _hb_os2_unicode_ranges[] =
{""") {""")

View File

@ -151,18 +151,13 @@ property_names = [
'Overstruck', 'Overstruck',
] ]
try:
basestring
except NameError:
basestring = str
class PropertyValue(object): class PropertyValue(object):
def __init__(self, name_): def __init__(self, name_):
self.name = name_ self.name = name_
def __str__(self): def __str__(self):
return self.name return self.name
def __eq__(self, other): def __eq__(self, other):
return self.name == (other if isinstance(other, basestring) else other.name) return self.name == (other if isinstance(other, str) else other.name)
def __ne__(self, other): def __ne__(self, other):
return not (self == other) return not (self == other)
def __hash__(self): def __hash__(self):

View File

@ -2,10 +2,6 @@
import sys, os, re, difflib, unicodedata, errno, cgi, itertools import sys, os, re, difflib, unicodedata, errno, cgi, itertools
from itertools import * from itertools import *
try:
import unicodedata2 as unicodedata
except Exception:
pass
diff_symbols = "-+=*&^%$#@!~/" diff_symbols = "-+=*&^%$#@!~/"
diff_colors = ['red', 'green', 'blue'] diff_colors = ['red', 'green', 'blue']