Merge pull request #5795 from jdufresne/six-unichr

Remove use of six.unichr()
This commit is contained in:
Takeshi KOMIYA 2018-12-16 10:27:16 +09:00 committed by GitHub
commit f296f80931
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,8 +4,6 @@ import re
import subprocess
import sys
import six
# find char codes they are matched with Python's (?u)\\w
match = re.compile(r'(?u)\w')
@ -16,7 +14,7 @@ singles = []
for i in range(65536):
# 0xd800-0xdfff is surrogate pair area. skip this.
if not match.match(six.unichr(i)) and not (0xd800 <= i <= 0xdfff):
if not match.match(chr(i)) and not (0xd800 <= i <= 0xdfff):
if begin == -1:
begin = i
elif begin != -1: