diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2019-03-28 19:39:52 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2019-03-28 19:39:52 +0100 |
commit | 1885e9f7418c0704cd5ca8d2fe16683d0c6e3a3a (patch) | |
tree | 8b3a8d5bee5fb58e927d7adb124cb7608065390d /src | |
parent | 2f695ace2ebd2c5ebeb421a93e07695ba460cf70 (diff) | |
download | ee-python-1885e9f7418c0704cd5ca8d2fe16683d0c6e3a3a.tar.gz ee-python-1885e9f7418c0704cd5ca8d2fe16683d0c6e3a3a.tar.bz2 ee-python-1885e9f7418c0704cd5ca8d2fe16683d0c6e3a3a.tar.xz ee-python-1885e9f7418c0704cd5ca8d2fe16683d0c6e3a3a.zip |
to_bom: We allow both Schematic and Schematics.
Diffstat (limited to 'src')
-rw-r--r-- | src/ee/kicad/to_bom.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ee/kicad/to_bom.py b/src/ee/kicad/to_bom.py index 5c3d988..8ca3c19 100644 --- a/src/ee/kicad/to_bom.py +++ b/src/ee/kicad/to_bom.py @@ -1,4 +1,4 @@ -from typing import Iterable +from typing import Iterable, Union from xml.etree.ElementTree import Element from ee.kicad.model import * @@ -35,7 +35,7 @@ def comp(c: Component) -> Element: return comp -def to_bom(schematic: Schematic) -> Iterable[Component]: +def to_bom(schematic: Union[Schematic, Schematics]) -> Iterable[Component]: return [c for c in sorted(schematic.components) if c.has_ref_num and c.ref_type != "#PWR" and c.ref_type != "#FLG"] |