mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
Fix _StrType in difflib in Python 2. (#2514)
difflib functions accept unicode as well.
This commit is contained in:
committed by
Sebastian Rittau
parent
a6b4f687e0
commit
ea0a0fd17e
@@ -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]]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user