@@ -4502,24 +4502,27 @@ def __iter__(self: T) -> Iterator[Shape]:
45024502 def filter (self : T , f : Callable [[CQObject ], bool ]) -> T :
45034503 """
45044504 Filter items using a boolean predicate.
4505+
45054506 :param f: Callable to be used for filtering.
45064507 :return: Workplane object with filtered items.
45074508 """
45084509
45094510 return self .newObject (filter (f , self .objects ))
45104511
4511- def map (self : T , f : Callable [[CQObject ], CQObject ]):
4512+ def map (self : T , f : Callable [[CQObject ], CQObject ]) -> T :
45124513 """
45134514 Apply a callable to every item separately.
4515+
45144516 :param f: Callable to be applied to every item separately.
45154517 :return: Workplane object with f applied to all items.
45164518 """
45174519
45184520 return self .newObject (map (f , self .objects ))
45194521
4520- def apply (self : T , f : Callable [[Iterable [CQObject ]], Iterable [CQObject ]]):
4522+ def apply (self : T , f : Callable [[Iterable [CQObject ]], Iterable [CQObject ]]) -> T :
45214523 """
45224524 Apply a callable to all items at once.
4525+
45234526 :param f: Callable to be applied.
45244527 :return: Workplane object with f applied to all items.
45254528 """
@@ -4529,6 +4532,7 @@ def apply(self: T, f: Callable[[Iterable[CQObject]], Iterable[CQObject]]):
45294532 def sort (self : T , key : Callable [[CQObject ], Any ]) -> T :
45304533 """
45314534 Sort items using a callable.
4535+
45324536 :param key: Callable to be used for sorting.
45334537 :return: Workplane object with items sorted.
45344538 """
@@ -4537,11 +4541,12 @@ def sort(self: T, key: Callable[[CQObject], Any]) -> T:
45374541
45384542 def invoke (
45394543 self : T , f : Union [Callable [[T ], T ], Callable [[T ], None ], Callable [[], None ]]
4540- ):
4544+ ) -> T :
45414545 """
45424546 Invoke a callable mapping Workplane to Workplane or None. Supports also
45434547 callables that take no arguments such as breakpoint. Returns self if callable
45444548 returns None.
4549+
45454550 :param f: Callable to be invoked.
45464551 :return: Workplane object.
45474552 """
0 commit comments