SchrodingersGat / KiBoM

Configurable BoM generation tool for KiCad EDA (http://kicad.org/)
MIT License
352 stars 95 forks source link

Merge blank fields logic #131

Open set-soft opened 3 years ago

set-soft commented 3 years ago

The current logic is:

https://github.com/SchrodingersGat/KiBoM/blob/06a14866d8166cfa71ae8ac1a48bda0c160fb380/kibom/component.py#L98-L100

I don't get it. If the idea is to loosly group fields: should't we be doing a return True? I mean:

 if this_field == "" or other_field == "": 
     if self.prefs.mergeBlankFields: 
         return True

Note that even when the condition seems to be equivalent it isn't. In this version of the code we have a chance to return True, in the other don't.