Skip to content

Commit c67ee04

Browse files
committed
<py311
1 parent 42f0b25 commit c67ee04

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

functional/pipeline.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@
2424
NoReturn,
2525
Optional,
2626
TypeVar,
27-
TypeVarTuple,
2827
Union,
2928
cast,
3029
overload,
3130
)
3231

3332
from tabulate import tabulate
34-
from typing_extensions import Self
33+
from typing_extensions import Self, TypeVarTuple, Unpack
3534

3635
from functional import transformations
3736
from functional.execution import ExecutionEngine, ExecutionStrategies
@@ -555,7 +554,9 @@ def select(self, func: Callable[[T], U]) -> Sequence[U]:
555554
"""Alias for map."""
556555
return self.map(func)
557556

558-
def starmap(self: Sequence[tuple[*Ts]], func: Callable[[*Ts], U]) -> Sequence[U]:
557+
def starmap(
558+
self: Sequence[tuple[Unpack[Ts]]], func: Callable[[Unpack[Ts]], U]
559+
) -> Sequence[U]:
559560
"""
560561
starmaps f onto the sequence as itertools.starmap does.
561562
@@ -567,7 +568,9 @@ def starmap(self: Sequence[tuple[*Ts]], func: Callable[[*Ts], U]) -> Sequence[U]
567568
"""
568569
return self._transform(transformations.starmap_t(func))
569570

570-
def smap(self: Sequence[tuple[*Ts]], func: Callable[[*Ts], U]) -> Sequence[U]:
571+
def smap(
572+
self: Sequence[tuple[Unpack[Ts]]], func: Callable[[Unpack[Ts]], U]
573+
) -> Sequence[U]:
571574
"""
572575
Alias to Sequence.starmap
573576

0 commit comments

Comments
 (0)