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,12 +1,12 @@
import sys
from typing import IO, Dict, List, Optional, Sequence, Text, Tuple, Union
from typing import IO, Dict, List, Optional, Sequence, Tuple, Union
if sys.version_info >= (3, 8):
from os import PathLike
def guess_type(url: Union[Text, PathLike[str]], strict: bool = ...) -> Tuple[Optional[str], Optional[str]]: ...
def guess_type(url: Union[str, PathLike[str]], strict: bool = ...) -> Tuple[Optional[str], Optional[str]]: ...
else:
def guess_type(url: Text, strict: bool = ...) -> Tuple[Optional[str], Optional[str]]: ...
def guess_type(url: str, strict: bool = ...) -> Tuple[Optional[str], Optional[str]]: ...
def guess_all_extensions(type: str, strict: bool = ...) -> List[str]: ...
def guess_extension(type: str, strict: bool = ...) -> Optional[str]: ...