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 sys
from typing import Any, Callable, Generic, Iterable, Mapping, Type, TypeVar, overload
from typing import Any, Callable, Generic, Iterable, Mapping, TypeVar, overload
if sys.version_info >= (3, 9):
from types import GenericAlias
@@ -19,17 +19,17 @@ def astuple(obj: Any) -> tuple[Any, ...]: ...
@overload
def astuple(obj: Any, *, tuple_factory: Callable[[list[Any]], _T]) -> _T: ...
@overload
def dataclass(_cls: Type[_T]) -> Type[_T]: ...
def dataclass(_cls: type[_T]) -> type[_T]: ...
@overload
def dataclass(_cls: None) -> Callable[[Type[_T]], Type[_T]]: ...
def dataclass(_cls: None) -> Callable[[type[_T]], type[_T]]: ...
@overload
def dataclass(
*, init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., unsafe_hash: bool = ..., frozen: bool = ...
) -> Callable[[Type[_T]], Type[_T]]: ...
) -> Callable[[type[_T]], type[_T]]: ...
class Field(Generic[_T]):
name: str
type: Type[_T]
type: type[_T]
default: _T
default_factory: Callable[[], _T]
repr: bool