From 89197dad4f5f427faa7fba12971b20037ad5ba71 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 14 Jun 2019 10:40:31 +0200 Subject: split-parts-by-supplier: rename to split-bom-by-supplier. digikey-create-bom: Implementing CSV generation for Digi-Key. --- src/ee/kicad/bom/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ee/kicad') diff --git a/src/ee/kicad/bom/__init__.py b/src/ee/kicad/bom/__init__.py index 0392d66..e993adb 100644 --- a/src/ee/kicad/bom/__init__.py +++ b/src/ee/kicad/bom/__init__.py @@ -10,6 +10,7 @@ __all__ = [ ] +# TODO: use ee.part.bom.split_ref def split_ref(ref): """Split "C12" into a tuple that's useful for sorting by component reference. @@ -23,11 +24,11 @@ def split_ref(ref): val = groups[1] rest = groups[2] try: - return (ref, int(val), rest) + return ref, int(val), rest except ValueError: pass - return (ref, val, rest) + return ref, val, rest split_ref.r = re.compile("([A-Za-z]+)([0-9]+)(.*)") -- cgit v1.2.3