Skip to content

Commit 5aefee5

Browse files
chore: auto fixes from pre-commit hooks
1 parent 44ccdee commit 5aefee5

File tree

5 files changed

+12
-14
lines changed

5 files changed

+12
-14
lines changed

src/ansys/geometry/core/_grpc/_services/base/prepare_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ def create_cylinder_enclosure(self, **kwargs) -> dict:
9898
def create_sphere_enclosure(self, **kwargs) -> dict:
9999
"""Create a sphere enclosure around bodies."""
100100
pass
101-
101+
102102
@abstractmethod
103103
def is_body_sweepable(self, **kwargs) -> dict:
104104
"""Check if body is sweepable."""
105-
pass
105+
pass

src/ansys/geometry/core/_grpc/_services/v0/prepare_tools.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def create_sphere_enclosure(self, **kwargs) -> dict: # noqa: D102
393393
"created_bodies": [body.id for body in response.created_bodies],
394394
"tracker_response": serialized_tracker_response,
395395
}
396-
396+
397397
@protect_grpc
398398
def is_body_sweepable(self, **kwargs): # noqa: D102
399399
from ansys.api.geometry.v0.preparetools_pb2 import IsBodySweepableRequest
@@ -410,10 +410,7 @@ def is_body_sweepable(self, **kwargs): # noqa: D102
410410
# Return the response - formatted as a dictionary
411411
return {
412412
"results": [
413-
{
414-
"sweepable": result.result,
415-
"face_ids": [face.id for face in result.face_ids]
416-
}
413+
{"sweepable": result.result, "face_ids": [face.id for face in result.face_ids]}
417414
for result in response.response_data
418415
]
419-
}
416+
}

src/ansys/geometry/core/_grpc/_services/v1/prepare_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def create_cylinder_enclosure(self, **kwargs) -> dict: # noqa: D102
9494
@protect_grpc
9595
def create_sphere_enclosure(self, **kwargs) -> dict: # noqa: D102
9696
raise NotImplementedError
97-
97+
9898
@protect_grpc
9999
def is_body_sweepable(self, **kwargs): # noqa: D102
100-
raise NotImplementedError
100+
raise NotImplementedError

src/ansys/geometry/core/tools/prepare_tools.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,7 @@ def is_body_sweepable(
803803
a list of source and target faces if requested.
804804
"""
805805
from ansys.geometry.core.designer.body import Body
806+
806807
check_type_all_elements_in_iterable(bodies, Body)
807808

808809
if not bodies:
@@ -820,5 +821,5 @@ def is_body_sweepable(
820821
if get_source_target_faces:
821822
faces.extend(get_faces_from_ids(parent_design, result_data.get("face_ids")))
822823
results.append((result_data.get("sweepable"), faces))
823-
824-
return results
824+
825+
return results

tests/integration/test_prepare_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def test_sphere_enclosure(modeler):
294294
modeler.prepare_tools.create_sphere_enclosure(bodies, 0.1, enclosure_options)
295295
assert len(design.components) == 1
296296
assert len(design.components[0].bodies) == 1
297-
297+
298298

299299
def test_is_body_sweepable(modeler: Modeler):
300300
"""Test body sweepability detection."""
@@ -340,4 +340,4 @@ def test_is_body_sweepable(modeler: Modeler):
340340

341341
# Test with empty input
342342
result = modeler.prepare_tools.is_body_sweepable([])
343-
assert result == []
343+
assert result == []

0 commit comments

Comments
 (0)