Fix _StrType in difflib in Python 2. (#2514)

difflib functions accept unicode as well.
This commit is contained in:
Rebecca Chen authored and Sebastian Rittau committed 2018-10-12 14:39:24 +02:00
1 parent a6b4f687e0
commit ea0a0fd17e
1 file changed
+1 -1
+1 -1
View File
@@ -12,7 +12,7 @@ if sys.version_info >= (3,):
_StrType = Text
else:
# Aliases can't point to type vars, so we need to redeclare AnyStr
_StrType = TypeVar('_StrType', str, bytes)
_StrType = TypeVar('_StrType', Text, bytes)
_JunkCallback = Union[Callable[[Text], bool], Callable[[str], bool]]