From a1c1d6d971257f03f1926db9dc44e659d2773d2d Mon Sep 17 00:00:00 2001 From: jaseg Date: Mon, 24 Jan 2022 14:19:01 +0100 Subject: Add more tests --- gerbonara/gerber/apertures.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gerbonara/gerber/apertures.py') diff --git a/gerbonara/gerber/apertures.py b/gerbonara/gerber/apertures.py index d288a2a..ab4a1a1 100644 --- a/gerbonara/gerber/apertures.py +++ b/gerbonara/gerber/apertures.py @@ -77,7 +77,10 @@ class Aperture: unit = settings.unit if settings else None actual_inst = self._rotated() params = 'X'.join(f'{float(par):.4}' for par in actual_inst.params(unit) if par is not None) - return ','.join((actual_inst.gerber_shape_code, params)) + if params: + return f'{actual_inst.gerber_shape_code},{params}' + else: + return actual_inst.gerber_shape_code def __eq__(self, other): # We need to choose some unit here. -- cgit