Use lowercase type everywhere (#6853)

This commit is contained in:
Alex Waygood
2022-01-08 15:09:29 +00:00
committed by GitHub
parent f8501d33c7
commit a40d79a4e6
172 changed files with 728 additions and 761 deletions

View File

@@ -1,5 +1,5 @@
import textwrap
from typing import IO, Any, Callable, Generic, Text, Type, TypeVar, overload
from typing import IO, Any, Callable, Generic, Text, TypeVar, overload
from typing_extensions import SupportsIndex
_TB = TypeVar("_TB", bound="_BaseEntry")
@@ -12,11 +12,11 @@ default_encoding: str
# encoding: str
# check_for_duplicates: bool
@overload
def pofile(pofile: Text, *, klass: Type[_TP], **kwargs: Any) -> _TP: ...
def pofile(pofile: Text, *, klass: type[_TP], **kwargs: Any) -> _TP: ...
@overload
def pofile(pofile: Text, **kwargs: Any) -> POFile: ...
@overload
def mofile(mofile: Text, *, klass: Type[_TM], **kwargs: Any) -> _TM: ...
def mofile(mofile: Text, *, klass: type[_TM], **kwargs: Any) -> _TM: ...
@overload
def mofile(mofile: Text, **kwargs: Any) -> MOFile: ...
def detect_encoding(file: bytes | Text, binary_mode: bool = ...) -> str: ...