From 1885e9f7418c0704cd5ca8d2fe16683d0c6e3a3a Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 28 Mar 2019 19:39:52 +0100 Subject: to_bom: We allow both Schematic and Schematics. --- src/ee/kicad/to_bom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ee/kicad') 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"] -- cgit v1.2.3