summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-02-06 13:24:01 +0100
committerjaseg <git@jaseg.de>2022-02-06 13:24:01 +0100
commitd5dcb60b5f7480b83b0d3099917fcae00d7f2710 (patch)
tree201e0eaa1678f86f6a823ff47d7fa1744f94baf1
parent344e6792c47c764c63b6902888b9e7492485f678 (diff)
downloadgerbonara-d5dcb60b5f7480b83b0d3099917fcae00d7f2710.tar.gz
gerbonara-d5dcb60b5f7480b83b0d3099917fcae00d7f2710.tar.bz2
gerbonara-d5dcb60b5f7480b83b0d3099917fcae00d7f2710.zip
Remove debug print statements
-rw-r--r--gerbonara/layers.py11
-rw-r--r--gerbonara/rs274x.py4
2 files changed, 0 insertions, 15 deletions
diff --git a/gerbonara/layers.py b/gerbonara/layers.py
index 178f6b2..4591f93 100644
--- a/gerbonara/layers.py
+++ b/gerbonara/layers.py
@@ -63,14 +63,11 @@ class NamingScheme:
def match_files(filenames):
matches = {}
for generator, rules in MATCH_RULES.items():
- print(generator)
gen = {}
matches[generator] = gen
for layer, regex in rules.items():
- print(' ->', layer, regex)
for fn in filenames:
if (m := re.fullmatch(regex, fn.name, re.IGNORECASE)):
- print(' ->', fn.name)
if layer == 'inner copper':
target = 'inner_' + ''.join(e or '' for e in m.groups()) + ' copper'
else:
@@ -218,9 +215,6 @@ class LayerStack:
files = [ path for path in directory.glob('**/*') if path.is_file() ]
generator, filemap = best_match(files)
- print('detected generator', generator)
- from pprint import pprint
- pprint(filemap)
if sum(len(files) for files in filemap.values()) < 6:
warnings.warn('Ambiguous gerber filenames. Trying last-resort autoguesser.')
@@ -280,10 +274,6 @@ class LayerStack:
else:
excellon_settings = None
- print('==> new')
- import pprint
- pprint.pprint(filemap)
-
ambiguous = [ f'{key} ({", ".join(x.name for x in value)})' for key, value in filemap.items() if len(value) > 1 and not 'drill' in key ]
if ambiguous:
raise SystemError(f'Ambiguous layer names: {", ".join(ambiguous)}')
@@ -297,7 +287,6 @@ class LayerStack:
for path in paths:
id_result = identify_file(path.read_text())
- #print('id_result', id_result)
if 'netlist' in key:
layer = Netlist.open(path)
diff --git a/gerbonara/rs274x.py b/gerbonara/rs274x.py
index 5c1ecc6..82ee047 100644
--- a/gerbonara/rs274x.py
+++ b/gerbonara/rs274x.py
@@ -631,16 +631,12 @@ class GerberParser:
# multiple statements from one line.
if line.strip() and self.eof_found:
self.warn('Data found in gerber file after EOF.')
- #print(f'Line {lineno}: {line}')
for name, le_regex in self.STATEMENT_REGEXES.items():
if (match := le_regex.match(line)):
- #print(f' match: {name} / {match}')
try:
getattr(self, f'_parse_{name}')(match)
except Exception as e:
- #print(f'Line {lineno}: {line}')
- #print(f' match: {name} / {match}')
raise SyntaxError(f'{filename}:{lineno} "{line}": {e}') from e
line = line[match.end(0):]
break