Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove margin setter asserts #850

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading