Skip to content

Commit 493fe87

Browse files
committed
fix type annotation
1 parent 39d8ee0 commit 493fe87

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/ezdxf/render/trace.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -558,14 +558,14 @@ def from_polyline(cls, polyline: DXFGraphic, segments: int = 64) -> TraceBuilder
558558
points.append(points[0])
559559

560560
trace = cls()
561-
store_bulge = None
562-
store_start_width = None
563-
store_end_width = None
564-
store_point = None
561+
store_bulge = 0.0
562+
store_start_width = 0.0
563+
store_end_width = 0.0
564+
store_point: UVec | None = None
565565

566566
linear_trace = LinearTrace()
567567
for point, start_width, end_width, bulge in points:
568-
if store_bulge:
568+
if store_bulge != 0.0:
569569
center, start_angle, end_angle, radius = bulge_to_arc(
570570
store_point, point, store_bulge
571571
)
@@ -583,10 +583,10 @@ def from_polyline(cls, polyline: DXFGraphic, segments: int = 64) -> TraceBuilder
583583
else:
584584
ew = store_end_width
585585
sw = store_start_width
586-
trace.append(CurvedTrace.from_arc(arc, sw, ew, segments)) # type: ignore
587-
store_bulge = None
586+
trace.append(CurvedTrace.from_arc(arc, sw, ew, segments))
587+
store_bulge = 0.0
588588

589-
if bulge != 0: # arc from prev_point to point
589+
if bulge != 0.0: # arc from prev_point to point
590590
if linear_trace.is_started:
591591
linear_trace.add_station(point, start_width, end_width)
592592
trace.append(linear_trace)

0 commit comments

Comments
 (0)