Skip to content

Commit

Permalink
Remove margin setter asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens committed Jun 5, 2024
1 parent df592b1 commit ac78d07
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Lib/ufo2ft/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,9 @@ def _setGlyphMargin(glyph, side, margin):
assert side in {"left", "right", "top", "bottom"}
if hasattr(glyph, f"set{side.title()}Margin"): # ufoLib2
getattr(glyph, f"set{side.title()}Margin")(margin)
assert getattr(glyph, f"get{side.title()}Margin")() == margin
elif hasattr(glyph, f"{side}Margin"): # defcon
descriptor = getattr(type(glyph), f"{side}Margin")
descriptor.__set__(glyph, margin)
assert descriptor.__get__(glyph) == margin
else:
raise NotImplementedError(f"Unsupported Glyph class: {type(glyph)!r}")

Expand Down

0 comments on commit ac78d07

Please sign in to comment.