Skip to content

Commit 09bd07d

Browse files
chore: auto fixes from pre-commit hooks
1 parent 2fa4aeb commit 09bd07d

File tree

5 files changed

+29
-23
lines changed

5 files changed

+29
-23
lines changed

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

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def detect_helixes(self, **kwargs): # noqa: D102
241241
min_radius=from_measurement_to_server_length(kwargs["min_radius"]),
242242
max_radius=from_measurement_to_server_length(kwargs["max_radius"]),
243243
fit_radius_error=from_measurement_to_server_length(kwargs["fit_radius_error"]),
244-
)
244+
),
245245
)
246246

247247
# Call the gRPC service
@@ -253,19 +253,27 @@ def detect_helixes(self, **kwargs): # noqa: D102
253253

254254
# Return the response - formatted as a dictionary
255255
return {
256-
"helixes": [{
257-
"trimmed_curve": {
258-
"geometry": from_grpc_curve_to_curve(helix.trimmed_curve.curve),
259-
"start": from_grpc_point_to_point3d(helix.trimmed_curve.start),
260-
"end": from_grpc_point_to_point3d(helix.trimmed_curve.end),
261-
"interval": Interval(helix.trimmed_curve.interval_start, helix.trimmed_curve.interval_end),
262-
"length": to_distance(helix.trimmed_curve.length).value,
263-
},
264-
"edges": [{
265-
"id": edge.id,
266-
"parent_id": edge.parent.id,
267-
"curve_type": edge.curve_type,
268-
"is_reversed": edge.is_reversed,
269-
} for edge in helix.edges]
270-
} for helix in response.helixes]
271-
}
256+
"helixes": [
257+
{
258+
"trimmed_curve": {
259+
"geometry": from_grpc_curve_to_curve(helix.trimmed_curve.curve),
260+
"start": from_grpc_point_to_point3d(helix.trimmed_curve.start),
261+
"end": from_grpc_point_to_point3d(helix.trimmed_curve.end),
262+
"interval": Interval(
263+
helix.trimmed_curve.interval_start, helix.trimmed_curve.interval_end
264+
),
265+
"length": to_distance(helix.trimmed_curve.length).value,
266+
},
267+
"edges": [
268+
{
269+
"id": edge.id,
270+
"parent_id": edge.parent.id,
271+
"curve_type": edge.curve_type,
272+
"is_reversed": edge.is_reversed,
273+
}
274+
for edge in helix.edges
275+
],
276+
}
277+
for helix in response.helixes
278+
]
279+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@ def remove_logo(self, **kwargs) -> dict: # noqa: D102
8181

8282
@protect_grpc
8383
def detect_helixes(self, **kwargs): # noqa: D102
84-
raise NotImplementedError
84+
raise NotImplementedError

src/ansys/geometry/core/shapes/curves/procedural.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626

2727
class ProceduralCurve(Curve):
2828
"""Provides a 3D procedural curve representation."""
29-
29+
3030
def __init__(self):
3131
"""Initialize the procedural curve."""
3232
super().__init__()
33-
34-

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ def find_and_remove_logos(
416416
)
417417

418418
return response.get("success")
419-
419+
420420
@min_backend_version(26, 1, 0)
421421
def detect_helixes(
422422
self,

tests/integration/test_prepare_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,4 +233,4 @@ def test_helix_detection(modeler: Modeler):
233233

234234
# Test with multiple bodies
235235
result = modeler.prepare_tools.detect_helixes(bodies)
236-
assert len(result["helixes"]) == 2
236+
assert len(result["helixes"]) == 2

0 commit comments

Comments
 (0)