Replace 'Text' with 'str' in py3 stdlib (#5466)

This commit is contained in:
Sebastian Rittau
2021-05-16 16:10:48 +02:00
committed by GitHub
parent dbe77b6ae9
commit 6a9c89e928
49 changed files with 328 additions and 349 deletions

View File

@@ -1,7 +1,5 @@
import sys
from typing import AnyStr, List, Optional, Text, Type, Union
_EitherStr = Union[bytes, Text]
from typing import AnyStr, List, Optional, Type
class PyCompileError(Exception):
exc_type_name: str
@@ -44,4 +42,4 @@ else:
file: AnyStr, cfile: Optional[AnyStr] = ..., dfile: Optional[AnyStr] = ..., doraise: bool = ..., optimize: int = ...
) -> Optional[AnyStr]: ...
def main(args: Optional[List[Text]] = ...) -> int: ...
def main(args: Optional[List[str]] = ...) -> int: ...