Skip to content

Commit

Permalink
Correctly handle footprint_type_mismatch DRC exclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
yaqwsx committed Mar 10, 2024
1 parent 296fc56 commit 96a9646
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kikit/drc.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class DrcExclusion:

def eqRepr(self) -> Tuple[str, Union[Tuple[str, str], str]]:
if len(self.objects) == 1:
return (self.type, self.objects[0])
objRepr = str(self.objects[0].m_Uuid.AsString()) if isinstance(self.objects[0], pcbnew.BOARD_ITEM) else self.objects[0]
return (self.type, objRepr)
if len(self.objects) == 2 or self.type in ["starved_thermal"]:
return (self.type, tuple(str(x.m_Uuid.AsString()) for x in self.objects))
raise RuntimeError("Unsupported exclusion object count")
Expand Down

0 comments on commit 96a9646

Please sign in to comment.