Skip to content

Commit

Permalink
Merge pull request #850 from googlefonts/remove-bounds-assert
Browse files Browse the repository at this point in the history
Remove margin setter asserts
  • Loading branch information
anthrotype authored Jun 5, 2024
2 parents df592b1 + ac78d07 commit 4c1c521
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 4c1c521

Please sign in to comment.