Skip to content

Commit 1774ae6

Browse files
committed
[stringbuilder] fix spacing in segment strings
removes extra space between words
1 parent b208a36 commit 1774ae6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/pathins/stringbuilder.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,12 @@ def segment_line(
193193

194194
return (
195195
f"{coordinates1} {coordinates2}: "
196-
f"{cyan_bright_text('LINE')} {round(distance, 2): .2f} units"
196+
f"{cyan_bright_text('LINE')} {round(distance, 2):.2f} units"
197197
)
198198
else:
199199
return (
200200
f"({coord1.x},{coord1.y}) ({coord2.x},{coord2.y}): "
201-
f"LINE {round(distance, 2): .2f} units"
201+
f"LINE {round(distance, 2):.2f} units"
202202
)
203203

204204

@@ -224,15 +224,17 @@ def segment_quadratic_curve(
224224

225225
if coord3.startpoint:
226226
coordinates3 = f"{green_start}({coord3.x},{coord3.y}){reset}"
227+
elif coord3.endpoint:
228+
coordinates3 = f"{red_start}({coord3.x},{coord3.y}){reset}"
227229
else:
228230
coordinates3 = f"({coord3.x},{coord3.y})"
229231

230232
return (
231-
f"{coordinates1} {coordinates2} {coordinates3} "
232-
f"{cyan_bright_text('QCURVE')} {round(distance, 2): .2f} units"
233+
f"{coordinates1} {coordinates2} {coordinates3}: "
234+
f"{cyan_bright_text('QCURVE')} {round(distance, 2):.2f} units"
233235
)
234236
else:
235237
return (
236-
f"({coord1.x},{coord1.y}) ({coord2.x},{coord2.y}) ({coord3.x},{coord3.y}) "
237-
f"QCURVE {round(distance, 2): .2f} units"
238+
f"({coord1.x},{coord1.y}) ({coord2.x},{coord2.y}) ({coord3.x},{coord3.y}): "
239+
f"QCURVE {round(distance, 2):.2f} units"
238240
)

0 commit comments

Comments
 (0)