perf(minor): remove unnecessary comprehensions (#25645)

This commit is contained in:
Ankush Menat
2021-06-11 16:00:48 +05:30
committed by GitHub
parent 5bb89b0ead
commit a9c84f749a
64 changed files with 126 additions and 126 deletions

View File

@@ -181,8 +181,8 @@ class BuyingController(StockController):
stock_and_asset_items_amount += flt(d.base_net_amount)
last_item_idx = d.idx
total_valuation_amount = sum([flt(d.base_tax_amount_after_discount_amount) for d in self.get("taxes")
if d.category in ["Valuation", "Valuation and Total"]])
total_valuation_amount = sum(flt(d.base_tax_amount_after_discount_amount) for d in self.get("taxes")
if d.category in ["Valuation", "Valuation and Total"])
valuation_amount_adjustment = total_valuation_amount
for i, item in enumerate(self.get("items")):
@@ -325,7 +325,7 @@ class BuyingController(StockController):
def update_raw_materials_supplied_based_on_stock_entries(self):
self.set('supplied_items', [])
purchase_orders = set([d.purchase_order for d in self.items])
purchase_orders = set(d.purchase_order for d in self.items)
# qty of raw materials backflushed (for each item per purchase order)
backflushed_raw_materials_map = get_backflushed_subcontracted_raw_materials(purchase_orders)