KiCad / kicad-library-utils

Some scripts for helping with library development
GNU General Public License v3.0
128 stars 92 forks source link

Error checking in sch.Component.addField #267

Closed airwoodix closed 4 years ago

airwoodix commented 5 years ago

Hello,

these commits fix the error checking TODOs on sch.Component.addField:

The function interface changed from a single dictionary to keyword based. This has at least two advantages: self-documentation is better and required arguments are explicit.

The ensure_quoted function is there because it is more natural to write comp.addField(name="foo", ref="bar") than comp.addField(name='"foo"', ref='"bar"').

The call to addField in the add_part_number.py script is modified accordingly.

poeschlr commented 4 years ago

Sorry for the delay, this looks good to me. (To be honest the sch class is not something we take great care of anyway as we do not really need it for our task of maintaining the library.)