Skip to content

Commit 5429f61

Browse files
authored
Update Wire fillet docstring (#1630)
* Update docstring * Update docstrings of Workplane speical methods, return type
1 parent 6d7d1d6 commit 5429f61

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

cadquery/cq.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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
"""

cadquery/occ_impl/shapes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2517,7 +2517,7 @@ def fillet(
25172517
) -> "Wire":
25182518
"""
25192519
Apply 2D or 3D fillet to a wire
2520-
:param wire: The input wire to fillet. Currently only open wires are supported
2520+
25212521
:param radius: the radius of the fillet, must be > zero
25222522
:param vertices: Optional list of vertices to fillet. By default all vertices are fillet.
25232523
:return: A wire with filleted corners

0 commit comments

Comments
 (0)