Skip assignment and return expression directly
This commit is contained in:
parent
da56841290
commit
0f3b5e9edf
@ -115,8 +115,7 @@ def generate_bom(harness):
|
|||||||
bom = sorted(bom, key=lambda k: k['item']) # sort list of dicts by their values (https://stackoverflow.com/a/73050)
|
bom = sorted(bom, key=lambda k: k['item']) # sort list of dicts by their values (https://stackoverflow.com/a/73050)
|
||||||
|
|
||||||
# add an incrementing id to each bom item
|
# add an incrementing id to each bom item
|
||||||
bom = [{**entry, 'id': index} for index, entry in enumerate(bom, 1)]
|
return [{**entry, 'id': index} for index, entry in enumerate(bom, 1)]
|
||||||
return bom
|
|
||||||
|
|
||||||
def get_bom_index(harness, item, unit, manufacturer, mpn, pn):
|
def get_bom_index(harness, item, unit, manufacturer, mpn, pn):
|
||||||
# Remove linebreaks and clean whitespace of values in search
|
# Remove linebreaks and clean whitespace of values in search
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user