From 826b790147974ed270c0fdf2ce7deb4c128f5bcb Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Mon, 19 Sep 2016 13:10:57 +0100 Subject: [PATCH] [ufo] minor refactor --- Lib/cu2qu/ufo.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Lib/cu2qu/ufo.py b/Lib/cu2qu/ufo.py index 04eb7d87b..cff04bdfe 100644 --- a/Lib/cu2qu/ufo.py +++ b/Lib/cu2qu/ufo.py @@ -189,14 +189,9 @@ def glyphs_to_quadratic( max_errors = max_err else: max_errors = [max_err] * len(glyphs) + assert len(max_errors) == len(glyphs) - num_glyphs = len(glyphs) - assert len(max_errors) == num_glyphs - - modified = _glyphs_to_quadratic( - glyphs, max_errors, reverse_direction, stats) - - return modified + return _glyphs_to_quadratic(glyphs, max_errors, reverse_direction, stats) def fonts_to_quadratic( @@ -227,9 +222,7 @@ def fonts_to_quadratic( max_errors = [max_err] * len(fonts) else: max_errors = [f.info.unitsPerEm * max_err_em for f in fonts] - - num_fonts = len(fonts) - assert len(max_errors) == num_fonts + assert len(max_errors) == len(fonts) modified = False for glyphs in zip(*fonts):