style change to prevent false codacy critical alert

hashable-paths
Andrew Port 2021-09-17 23:35:26 -07:00
parent 767413c896
commit 9c2e403036
1 changed files with 6 additions and 3 deletions

View File

@ -80,11 +80,14 @@ _is_smooth_from_warning = \
def bezier_segment(*bpoints):
if len(bpoints) == 2:
return Line(*bpoints)
start, end = bpoints
return Line(start, end)
elif len(bpoints) == 4:
return CubicBezier(*bpoints)
start, control1, control2, end = bpoints
return CubicBezier(start, control1, control2, end)
elif len(bpoints) == 3:
return QuadraticBezier(*bpoints)
start, control, end = bpoints
return QuadraticBezier(start, control, end)
else:
assert len(bpoints) in (2, 3, 4)