aboutsummaryrefslogtreecommitdiff
path: root/src/ee/kicad/to_bom.py
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-02-21 08:18:52 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2019-02-21 08:21:06 +0100
commitb9c8e02072ea6da04ddc9fe9795f699697f25d07 (patch)
treee4c71df9d67a7e535cb7ab81aeea3cb27b974a33 /src/ee/kicad/to_bom.py
parent3937c49feaca7883f025b4f4e86958dc1ada09fe (diff)
downloadee-python-b9c8e02072ea6da04ddc9fe9795f699697f25d07.tar.gz
ee-python-b9c8e02072ea6da04ddc9fe9795f699697f25d07.tar.bz2
ee-python-b9c8e02072ea6da04ddc9fe9795f699697f25d07.tar.xz
ee-python-b9c8e02072ea6da04ddc9fe9795f699697f25d07.zip
o Reformat.
to_bom: export to_tom_xml too. model: o More type annotations. o Parse ref_type and ref_num when constructed.
Diffstat (limited to 'src/ee/kicad/to_bom.py')
-rw-r--r--src/ee/kicad/to_bom.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ee/kicad/to_bom.py b/src/ee/kicad/to_bom.py
index 62eb075..5c3d988 100644
--- a/src/ee/kicad/to_bom.py
+++ b/src/ee/kicad/to_bom.py
@@ -2,7 +2,7 @@ from typing import Iterable
from xml.etree.ElementTree import Element
from ee.kicad.model import *
-__all__ = ["to_bom"]
+__all__ = ["to_bom", "to_bom_xml"]
def simple_element(parent, e, text):
@@ -36,7 +36,7 @@ def comp(c: Component) -> Element:
def to_bom(schematic: Schematic) -> Iterable[Component]:
- return [c for c in sorted(schematic.components) if c.ref_type != "#PWR" and c.ref_type != "#FLG"]
+ return [c for c in sorted(schematic.components) if c.has_ref_num and c.ref_type != "#PWR" and c.ref_type != "#FLG"]
def to_bom_xml(schematic: Schematic) -> Element: