summaryrefslogtreecommitdiff
path: root/gerber/excellon_statements.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2014-10-07 09:12:46 -0400
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2014-10-07 09:12:46 -0400
commit8ac771db92633fab9aa0ff9ecc7333e6a412e577 (patch)
tree07782169126e2a4e93ef456648c5d91b86fbfe7b /gerber/excellon_statements.py
parentf7c19398730d95bd4f34834ebcf66d9a68273055 (diff)
downloadgerbonara-8ac771db92633fab9aa0ff9ecc7333e6a412e577.tar.gz
gerbonara-8ac771db92633fab9aa0ff9ecc7333e6a412e577.tar.bz2
gerbonara-8ac771db92633fab9aa0ff9ecc7333e6a412e577.zip
More tests
Diffstat (limited to 'gerber/excellon_statements.py')
-rw-r--r--gerber/excellon_statements.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/gerber/excellon_statements.py b/gerber/excellon_statements.py
index dbd807a..13f763e 100644
--- a/gerber/excellon_statements.py
+++ b/gerber/excellon_statements.py
@@ -221,16 +221,19 @@ class CoordinateStmt(ExcellonStatement):
@classmethod
def from_excellon(cls, line, nformat=(2, 5), zero_suppression='trailing'):
- x = None
- y = None
+ x_coord = None
+ y_coord = None
if line[0] == 'X':
splitline = line.strip('X').split('Y')
- x = parse_gerber_value(splitline[0].strip(), nformat, zero_suppression)
+ x_coord = parse_gerber_value(splitline[0].strip(), nformat,
+ zero_suppression)
if len(splitline) == 2:
- y = parse_gerber_value(splitline[1].strip(), nformat, zero_suppression)
+ y_coord = parse_gerber_value(splitline[1].strip(), nformat,
+ zero_suppression)
else:
- y = parse_gerber_value(line.strip(' Y'), nformat, zero_suppression)
- return cls(x, y)
+ y_coord = parse_gerber_value(line.strip(' Y'), nformat,
+ zero_suppression)
+ return cls(x_coord, y_coord)
def __init__(self, x=None, y=None):
self.x = x