diff options
Diffstat (limited to 'src/ee/kicad')
-rw-r--r-- | src/ee/kicad/doit.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ee/kicad/doit.py b/src/ee/kicad/doit.py index a3f8464..30ca40d 100644 --- a/src/ee/kicad/doit.py +++ b/src/ee/kicad/doit.py @@ -25,8 +25,8 @@ _dsm = None # type: DataSetManager _data_sets = {} -def change_data_sets_for_task(task, callable): - _data_sets[task] = callable(_data_sets[task]) +def change_data_sets_for_task(task, _callable): + _data_sets[task] = _callable(_data_sets[task]) def init(data_set_manager: DataSetManager, **kwargs): @@ -92,7 +92,7 @@ def task_kicad_sch_to_data_set(): def action(): from ee.kicad.model import ComponentField - with _dsm.create_rw(out_data_set) as ds: + with _dsm.create_rw(out_data_set, clean=True) as ds: schematics = ee.kicad.read_schematics(sch) for c in [c for c in schematics.components]: o = ds.create_object("kicad-schematic-component", c.timestamp) @@ -129,7 +129,7 @@ def task_kicad_pcb_to_data_set(): logger.debug("Parsing PCB {}".format(kicad_pcb)) - with _dsm.create_rw(out_data_set, inputs=in_data_sets) as ds: + with _dsm.create_rw(out_data_set, clean=True) as ds: # [ds.delete(o) for o in ds.items(object_type="kicad-pcb-component")] pcb = ee.kicad.pcb.parse(kicad_pcb) # type: KicadPcb @@ -179,7 +179,7 @@ def task_kicad_create_component_data_set(): return footprint - with _dsm.create_rw(out_data_set) as output: + with _dsm.create_rw(out_data_set, clean=True) as output: kicad_sch = [o for o in in_ds.items() if o.object_type.name == "kicad-schematic-component"] logger.info("processing {} kicad-sch".format(len(kicad_sch))) |