From d5dcb60b5f7480b83b0d3099917fcae00d7f2710 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 6 Feb 2022 13:24:01 +0100 Subject: Remove debug print statements --- gerbonara/layers.py | 11 ----------- gerbonara/rs274x.py | 4 ---- 2 files changed, 15 deletions(-) (limited to 'gerbonara') 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 -- cgit