mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-26 21:08:59 +08:00
Use lowercase tuple where possible (#6170)
This commit is contained in:
@@ -91,8 +91,8 @@ class groupby(Iterator[Tuple[_T, Iterator[_S]]], Generic[_T, _S]):
|
||||
def __new__(cls, iterable: Iterable[_T1], key: None = ...) -> groupby[_T1, _T1]: ...
|
||||
@overload
|
||||
def __new__(cls, iterable: Iterable[_T1], key: Callable[[_T1], _T2]) -> groupby[_T2, _T1]: ...
|
||||
def __iter__(self) -> Iterator[Tuple[_T, Iterator[_S]]]: ...
|
||||
def __next__(self) -> Tuple[_T, Iterator[_S]]: ...
|
||||
def __iter__(self) -> Iterator[tuple[_T, Iterator[_S]]]: ...
|
||||
def __next__(self) -> tuple[_T, Iterator[_S]]: ...
|
||||
|
||||
class islice(Iterator[_T], Generic[_T]):
|
||||
@overload
|
||||
@@ -126,15 +126,15 @@ _T6 = TypeVar("_T6")
|
||||
|
||||
class product(Iterator[_T_co], Generic[_T_co]):
|
||||
@overload
|
||||
def __new__(cls, __iter1: Iterable[_T1]) -> product[Tuple[_T1]]: ...
|
||||
def __new__(cls, __iter1: Iterable[_T1]) -> product[tuple[_T1]]: ...
|
||||
@overload
|
||||
def __new__(cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2]) -> product[Tuple[_T1, _T2]]: ...
|
||||
def __new__(cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2]) -> product[tuple[_T1, _T2]]: ...
|
||||
@overload
|
||||
def __new__(cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]) -> product[Tuple[_T1, _T2, _T3]]: ...
|
||||
def __new__(cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]) -> product[tuple[_T1, _T2, _T3]]: ...
|
||||
@overload
|
||||
def __new__(
|
||||
cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4]
|
||||
) -> product[Tuple[_T1, _T2, _T3, _T4]]: ...
|
||||
) -> product[tuple[_T1, _T2, _T3, _T4]]: ...
|
||||
@overload
|
||||
def __new__(
|
||||
cls,
|
||||
@@ -143,7 +143,7 @@ class product(Iterator[_T_co], Generic[_T_co]):
|
||||
__iter3: Iterable[_T3],
|
||||
__iter4: Iterable[_T4],
|
||||
__iter5: Iterable[_T5],
|
||||
) -> product[Tuple[_T1, _T2, _T3, _T4, _T5]]: ...
|
||||
) -> product[tuple[_T1, _T2, _T3, _T4, _T5]]: ...
|
||||
@overload
|
||||
def __new__(
|
||||
cls,
|
||||
@@ -153,7 +153,7 @@ class product(Iterator[_T_co], Generic[_T_co]):
|
||||
__iter4: Iterable[_T4],
|
||||
__iter5: Iterable[_T5],
|
||||
__iter6: Iterable[_T6],
|
||||
) -> product[Tuple[_T1, _T2, _T3, _T4, _T5, _T6]]: ...
|
||||
) -> product[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]: ...
|
||||
@overload
|
||||
def __new__(
|
||||
cls,
|
||||
@@ -180,13 +180,13 @@ class permutations(Iterator[Tuple[_T, ...]], Generic[_T]):
|
||||
|
||||
class combinations(Iterator[_T_co], Generic[_T_co]):
|
||||
@overload
|
||||
def __new__(cls, iterable: Iterable[_T], r: Literal[2]) -> combinations[Tuple[_T, _T]]: ...
|
||||
def __new__(cls, iterable: Iterable[_T], r: Literal[2]) -> combinations[tuple[_T, _T]]: ...
|
||||
@overload
|
||||
def __new__(cls, iterable: Iterable[_T], r: Literal[3]) -> combinations[Tuple[_T, _T, _T]]: ...
|
||||
def __new__(cls, iterable: Iterable[_T], r: Literal[3]) -> combinations[tuple[_T, _T, _T]]: ...
|
||||
@overload
|
||||
def __new__(cls, iterable: Iterable[_T], r: Literal[4]) -> combinations[Tuple[_T, _T, _T, _T]]: ...
|
||||
def __new__(cls, iterable: Iterable[_T], r: Literal[4]) -> combinations[tuple[_T, _T, _T, _T]]: ...
|
||||
@overload
|
||||
def __new__(cls, iterable: Iterable[_T], r: Literal[5]) -> combinations[Tuple[_T, _T, _T, _T, _T]]: ...
|
||||
def __new__(cls, iterable: Iterable[_T], r: Literal[5]) -> combinations[tuple[_T, _T, _T, _T, _T]]: ...
|
||||
@overload
|
||||
def __new__(cls, iterable: Iterable[_T], r: int) -> combinations[Tuple[_T, ...]]: ...
|
||||
def __iter__(self) -> Iterator[_T_co]: ...
|
||||
@@ -199,6 +199,6 @@ class combinations_with_replacement(Iterator[Tuple[_T, ...]], Generic[_T]):
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
class pairwise(Iterator[_T_co], Generic[_T_co]):
|
||||
def __new__(cls, __iterable: Iterable[_T]) -> pairwise[Tuple[_T, _T]]: ...
|
||||
def __new__(cls, __iterable: Iterable[_T]) -> pairwise[tuple[_T, _T]]: ...
|
||||
def __iter__(self) -> Iterator[_T_co]: ...
|
||||
def __next__(self) -> _T_co: ...
|
||||
|
||||
Reference in New Issue
Block a user