Make several type aliases private (#7661)

This commit is contained in:
Alex Waygood
2022-04-18 22:19:16 +01:00
committed by GitHub
parent 67425a89d4
commit 3930d8d12a
4 changed files with 16 additions and 15 deletions

View File

@@ -20,7 +20,7 @@ _T6 = TypeVar("_T6")
_Step: TypeAlias = int | float | SupportsFloat | SupportsInt | SupportsIndex | SupportsComplex
Predicate: TypeAlias = Callable[[_T], object]
_Predicate: TypeAlias = Callable[[_T], object]
# Technically count can take anything that implements a number protocol and has an add method
# but we can't enforce the add method
@@ -76,12 +76,12 @@ class compress(Iterator[_T], Generic[_T]):
def __next__(self) -> _T: ...
class dropwhile(Iterator[_T], Generic[_T]):
def __init__(self, __predicate: Predicate[_T], __iterable: Iterable[_T]) -> None: ...
def __init__(self, __predicate: _Predicate[_T], __iterable: Iterable[_T]) -> None: ...
def __iter__(self: Self) -> Self: ...
def __next__(self) -> _T: ...
class filterfalse(Iterator[_T], Generic[_T]):
def __init__(self, __predicate: Predicate[_T] | None, __iterable: Iterable[_T]) -> None: ...
def __init__(self, __predicate: _Predicate[_T] | None, __iterable: Iterable[_T]) -> None: ...
def __iter__(self: Self) -> Self: ...
def __next__(self) -> _T: ...
@@ -107,7 +107,7 @@ class starmap(Iterator[_T], Generic[_T]):
def __next__(self) -> _T: ...
class takewhile(Iterator[_T], Generic[_T]):
def __init__(self, __predicate: Predicate[_T], __iterable: Iterable[_T]) -> None: ...
def __init__(self, __predicate: _Predicate[_T], __iterable: Iterable[_T]) -> None: ...
def __iter__(self: Self) -> Self: ...
def __next__(self) -> _T: ...