summaryrefslogtreecommitdiff
path: root/gerbonara/layers.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-02-21 22:48:14 +0100
committerjaseg <git@jaseg.de>2023-02-21 22:48:14 +0100
commit6231f67139f64e71fdb0893d86ff3308572d46d8 (patch)
treef788f0711c158c327b038f69f13975ff0fbf75ab /gerbonara/layers.py
parent9a6bc691cb0fa96d50a93e6bce60161a4fc6940d (diff)
downloadgerbonara-6231f67139f64e71fdb0893d86ff3308572d46d8.tar.gz
gerbonara-6231f67139f64e71fdb0893d86ff3308572d46d8.tar.bz2
gerbonara-6231f67139f64e71fdb0893d86ff3308572d46d8.zip
Fix tests
Diffstat (limited to 'gerbonara/layers.py')
-rw-r--r--gerbonara/layers.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/gerbonara/layers.py b/gerbonara/layers.py
index a1fafc6..a1c854a 100644
--- a/gerbonara/layers.py
+++ b/gerbonara/layers.py
@@ -154,7 +154,7 @@ def common_prefix(l):
return sorted(out, key=len)[-1]
-def autoguess(filenames):
+def do_autoguess(filenames):
prefix = common_prefix([f.name for f in filenames])
matches = {}
@@ -313,7 +313,7 @@ class LayerStack:
if sum(len(files) for files in filemap.values()) < 6:
warnings.warn('Ambiguous gerber filenames. Trying last-resort autoguesser.')
generator = None
- filemap = autoguess(files)
+ filemap = do_autoguess(files)
if len(filemap) < 6:
raise ValueError('Cannot figure out gerber file mapping. Partial map is: ', filemap)
@@ -338,13 +338,13 @@ class LayerStack:
# Ignore if we can't find the param file -- maybe the user has convinced Allegro to actually put this
# information into a comment, or maybe they have made Allegro just use decimal points like XNC does.
- filemap = autoguess([ f for files in filemap.values() for f in files ])
+ filemap = do_autoguess([ f for files in filemap.values() for f in files ])
if len(filemap) < 6:
raise SystemError('Cannot figure out gerber file mapping')
# FIXME use layer metadata from comments and ipc file if available
elif generator == 'zuken':
- filemap = autoguess([ f for files in filemap.values() for f in files ])
+ filemap = do_autoguess([ f for files in filemap.values() for f in files ])
if len(filemap) < 6:
raise SystemError('Cannot figure out gerber file mapping')
# FIXME use layer metadata from comments and ipc file if available