Skip to content

Commit 2efa1f0

Browse files
committed
Code reformat.
1 parent 4110dd0 commit 2efa1f0

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

cadquery/cq.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3801,13 +3801,13 @@ def sphere(
38013801
return self.union(spheres, clean=clean)
38023802

38033803
def cylinder(
3804-
self: T,
3805-
radius: float,
3806-
height: float,
3807-
centered: Union[bool, Tuple[bool, bool, bool]] = True,
3808-
combine: bool = True,
3809-
clean: bool = True,
3810-
) -> T:
3804+
self: T,
3805+
radius: float,
3806+
height: float,
3807+
centered: Union[bool, Tuple[bool, bool, bool]] = True,
3808+
combine: bool = True,
3809+
clean: bool = True,
3810+
) -> T:
38113811

38123812
"""
38133813
Returns a cylinder with the specified radius and height for each point on the stack

tests/test_cadquery.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2458,20 +2458,24 @@ def testCylinderCentering(self):
24582458
b = (True, False)
24592459
expected_x = (0, radius)
24602460
expected_y = (0, radius)
2461-
expected_z = (0, height/2)
2461+
expected_z = (0, height / 2)
24622462
for (xopt, xval), (yopt, yval), (zopt, zval) in product(
24632463
zip(b, expected_x), zip(b, expected_y), zip(b, expected_z)
24642464
):
24652465
s = Workplane("XY").cylinder(radius, height, centered=(xopt, yopt, zopt))
24662466
self.assertEqual(1, s.size())
2467-
self.assertTupleAlmostEquals(s.val().Center().toTuple(), (xval, yval, zval), 3)
2467+
self.assertTupleAlmostEquals(
2468+
s.val().Center().toTuple(), (xval, yval, zval), 3
2469+
)
24682470
# check centered=True produces the same result as centered=(True, True, True)
24692471
for val in b:
24702472
s0 = Workplane("XY").cylinder(radius, height, centered=val)
24712473
self.assertEqual(s0.size(), 1)
24722474
s1 = Workplane("XY").cylinder(radius, height, centered=(val, val, val))
24732475
self.assertEqual(s1.size(), 1)
2474-
self.assertTupleAlmostEquals(s0.val().Center().toTuple(), s1.val().Center().toTuple(), 3)
2476+
self.assertTupleAlmostEquals(
2477+
s0.val().Center().toTuple(), s1.val().Center().toTuple(), 3
2478+
)
24752479

24762480
def testWedgeDefaults(self):
24772481
s = Workplane("XY").wedge(10, 10, 10, 5, 5, 5, 5)

0 commit comments

Comments
 (0)