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,7 +1,7 @@
import sys
import types
from _typeshed import SupportsAllComparisons, SupportsItems
from typing import Any, Callable, Generic, Hashable, Iterable, NamedTuple, Sequence, Sized, Type, TypeVar, overload
from typing import Any, Callable, Generic, Hashable, Iterable, NamedTuple, Sequence, Sized, TypeVar, overload
from typing_extensions import final
if sys.version_info >= (3, 9):
@@ -44,14 +44,14 @@ WRAPPER_UPDATES: Sequence[str]
def update_wrapper(wrapper: _T, wrapped: _AnyCallable, assigned: Sequence[str] = ..., updated: Sequence[str] = ...) -> _T: ...
def wraps(wrapped: _AnyCallable, assigned: Sequence[str] = ..., updated: Sequence[str] = ...) -> Callable[[_T], _T]: ...
def total_ordering(cls: Type[_T]) -> Type[_T]: ...
def total_ordering(cls: type[_T]) -> type[_T]: ...
def cmp_to_key(mycmp: Callable[[_T, _T], int]) -> Callable[[_T], SupportsAllComparisons]: ...
class partial(Generic[_T]):
func: Callable[..., _T]
args: tuple[Any, ...]
keywords: dict[str, Any]
def __new__(cls: Type[_S], __func: Callable[..., _T], *args: Any, **kwargs: Any) -> _S: ...
def __new__(cls: type[_S], __func: Callable[..., _T], *args: Any, **kwargs: Any) -> _S: ...
def __call__(__self, *args: Any, **kwargs: Any) -> _T: ...
if sys.version_info >= (3, 9):
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
@@ -67,7 +67,7 @@ class partialmethod(Generic[_T]):
def __init__(self, __func: Callable[..., _T], *args: Any, **keywords: Any) -> None: ...
@overload
def __init__(self, __func: _Descriptor, *args: Any, **keywords: Any) -> None: ...
def __get__(self, obj: Any, cls: Type[Any]) -> Callable[..., _T]: ...
def __get__(self, obj: Any, cls: type[Any]) -> Callable[..., _T]: ...
@property
def __isabstractmethod__(self) -> bool: ...
if sys.version_info >= (3, 9):
@@ -79,14 +79,14 @@ class _SingleDispatchCallable(Generic[_T]):
# @fun.register(complex)
# def _(arg, verbose=False): ...
@overload
def register(self, cls: Type[Any], func: None = ...) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
def register(self, cls: type[Any], func: None = ...) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
# @fun.register
# def _(arg: int, verbose=False):
@overload
def register(self, cls: Callable[..., _T], func: None = ...) -> Callable[..., _T]: ...
# fun.register(int, lambda x: x)
@overload
def register(self, cls: Type[Any], func: Callable[..., _T]) -> Callable[..., _T]: ...
def register(self, cls: type[Any], func: Callable[..., _T]) -> Callable[..., _T]: ...
def _clear_cache(self) -> None: ...
def __call__(__self, *args: Any, **kwargs: Any) -> _T: ...
@@ -98,21 +98,21 @@ if sys.version_info >= (3, 8):
func: Callable[..., _T]
def __init__(self, func: Callable[..., _T]) -> None: ...
@overload
def register(self, cls: Type[Any], method: None = ...) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
def register(self, cls: type[Any], method: None = ...) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
@overload
def register(self, cls: Callable[..., _T], method: None = ...) -> Callable[..., _T]: ...
@overload
def register(self, cls: Type[Any], method: Callable[..., _T]) -> Callable[..., _T]: ...
def register(self, cls: type[Any], method: Callable[..., _T]) -> Callable[..., _T]: ...
def __call__(self, *args: Any, **kwargs: Any) -> _T: ...
class cached_property(Generic[_T]):
func: Callable[[Any], _T]
attrname: str | None
def __init__(self, func: Callable[[Any], _T]) -> None: ...
@overload
def __get__(self, instance: None, owner: Type[Any] | None = ...) -> cached_property[_T]: ...
def __get__(self, instance: None, owner: type[Any] | None = ...) -> cached_property[_T]: ...
@overload
def __get__(self, instance: object, owner: Type[Any] | None = ...) -> _T: ...
def __set_name__(self, owner: Type[Any], name: str) -> None: ...
def __get__(self, instance: object, owner: type[Any] | None = ...) -> _T: ...
def __set_name__(self, owner: type[Any], name: str) -> None: ...
if sys.version_info >= (3, 9):
def __class_getitem__(cls, item: Any) -> GenericAlias: ...