Skip to content

Commit

Permalink
new mypy, new "type ignore"
Browse files Browse the repository at this point in the history
  • Loading branch information
mozman committed Feb 5, 2025
1 parent f4332b2 commit e165836
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ezdxf/entities/boundary_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def _edges(points) -> Iterable[Union[LineEdge, ArcEdge]]:
start_angle,
end_angle,
arc.radius,
) = bulge_to_arc(prev_point, point, prev_bulge)
) = bulge_to_arc(prev_point, point, prev_bulge) # type: ignore
chk_point = arc.center + Vec2.from_angle(start_angle, arc.radius)
arc.ccw = chk_point.isclose(prev_point, abs_tol=1e-9)
arc.start_angle = math.degrees(start_angle) % 360.0
Expand Down
2 changes: 1 addition & 1 deletion src/ezdxf/entities/mleader.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ def load(cls, context: list[Union[DXFTag, list]]) -> MLeaderContext:
ctx.mtext = content
elif code == 296 and value == 1:
content = BlockData() # type: ignore
ctx.block = content
ctx.block = content # type: ignore
else:
name = MLeaderContext.ATTRIBS.get(code)
if name:
Expand Down
6 changes: 3 additions & 3 deletions src/ezdxf/render/polyline.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _virtual_polyline_entities(
attribs = dict(dxfattribs)
if prev_bulge != 0:
center, start_angle, end_angle, radius = bulge_to_arc(
prev_point, point, prev_bulge
prev_point, point, prev_bulge # type: ignore
)
if radius > 0:
attribs["center"] = Vec3(center.x, center.y, elevation)
Expand All @@ -125,11 +125,11 @@ def _virtual_polyline_entities(
attribs["end_angle"] = math.degrees(end_angle)
if extrusion:
attribs["extrusion"] = extrusion
yield factory.new(dxftype="ARC", dxfattribs=attribs, doc=doc)
yield factory.new(dxftype="ARC", dxfattribs=attribs, doc=doc) # type: ignore
else:
attribs["start"] = ocs.to_wcs(prev_point)
attribs["end"] = ocs.to_wcs(point)
yield factory.new(dxftype="LINE", dxfattribs=attribs, doc=doc)
yield factory.new(dxftype="LINE", dxfattribs=attribs, doc=doc) # type: ignore
prev_point = point
prev_bulge = bulge

Expand Down
2 changes: 1 addition & 1 deletion src/ezdxf/render/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def from_polyline(cls, polyline: DXFGraphic, segments: int = 64) -> TraceBuilder
else:
ew = store_end_width
sw = store_start_width
trace.append(CurvedTrace.from_arc(arc, sw, ew, segments))
trace.append(CurvedTrace.from_arc(arc, sw, ew, segments)) # type: ignore
store_bulge = None

if bulge != 0: # arc from prev_point to point
Expand Down

0 comments on commit e165836

Please sign in to comment.