fix: fix 'consider-using-set-comprehension' for pylint

This commit is contained in:
Lance Edgar 2025-09-01 15:10:28 -05:00
parent 8d8f276793
commit efa13362e1
2 changed files with 4 additions and 5 deletions

View file

@ -10,4 +10,3 @@ disable=fixme,
broad-exception-caught,
consider-using-dict-comprehension,
consider-using-f-string,
consider-using-set-comprehension,

View file

@ -154,7 +154,7 @@ class LocalProductView(MasterView):
model = self.app.model
route_prefix = self.get_route_prefix()
orders = set([item.order for item in product.order_items])
orders = {item.order for item in product.order_items}
orders = sorted(orders, key=lambda order: order.order_id)
grid = self.make_grid(
@ -192,7 +192,7 @@ class LocalProductView(MasterView):
model = self.app.model
route_prefix = self.get_route_prefix()
batches = set([row.batch for row in product.new_order_batch_rows])
batches = {row.batch for row in product.new_order_batch_rows}
batches = sorted(batches, key=lambda batch: batch.id)
grid = self.make_grid(
@ -372,7 +372,7 @@ class PendingProductView(MasterView):
model = self.app.model
route_prefix = self.get_route_prefix()
orders = set([item.order for item in product.order_items])
orders = {item.order for item in product.order_items}
orders = sorted(orders, key=lambda order: order.order_id)
grid = self.make_grid(
@ -410,7 +410,7 @@ class PendingProductView(MasterView):
model = self.app.model
route_prefix = self.get_route_prefix()
batches = set([row.batch for row in product.new_order_batch_rows])
batches = {row.batch for row in product.new_order_batch_rows}
batches = sorted(batches, key=lambda batch: batch.id)
grid = self.make_grid(