diff --git a/.pylintrc b/.pylintrc index 8a3395e..3bda06f 100644 --- a/.pylintrc +++ b/.pylintrc @@ -32,4 +32,3 @@ disable=fixme, unnecessary-lambda-assignment, unused-argument, unused-import, - unused-variable, diff --git a/src/sideshow/batch/neworder.py b/src/sideshow/batch/neworder.py index fd0a05e..11dac0b 100644 --- a/src/sideshow/batch/neworder.py +++ b/src/sideshow/batch/neworder.py @@ -597,7 +597,6 @@ class NewOrderBatchHandler(BatchHandler): :returns: List of product info dicts. """ - model = self.app.model session = self.app.get_session(batch) use_local = self.use_local_products() user = user or batch.created_by @@ -1205,7 +1204,6 @@ class NewOrderBatchHandler(BatchHandler): :returns: :class:`~sideshow.db.model.orders.Order` instance. """ model = self.app.model - enum = self.app.enum session = self.app.get_session(batch) batch_fields = [ diff --git a/src/sideshow/web/app.py b/src/sideshow/web/app.py index 8d10424..1b1e448 100644 --- a/src/sideshow/web/app.py +++ b/src/sideshow/web/app.py @@ -2,7 +2,7 @@ ################################################################################ # # Sideshow -- Case/Special Order Tracker -# Copyright © 2024 Lance Edgar +# Copyright © 2024-2025 Lance Edgar # # This file is part of Sideshow. # @@ -41,7 +41,7 @@ def main(global_config, **settings): ) # make config objects - wutta_config = base.make_wutta_config(settings) + wutta_config = base.make_wutta_config(settings) # pylint: disable=unused-variable pyramid_config = base.make_pyramid_config(settings) # bring in the rest of Sideshow diff --git a/src/sideshow/web/views/batch/neworder.py b/src/sideshow/web/views/batch/neworder.py index d847a14..99ffda5 100644 --- a/src/sideshow/web/views/batch/neworder.py +++ b/src/sideshow/web/views/batch/neworder.py @@ -167,7 +167,6 @@ class NewOrderBatchView(BatchMasterView): def configure_row_grid(self, g): """ """ super().configure_row_grid(g) - enum = self.app.enum # TODO # order_uom diff --git a/src/sideshow/web/views/customers.py b/src/sideshow/web/views/customers.py index eb252c3..eeaf766 100644 --- a/src/sideshow/web/views/customers.py +++ b/src/sideshow/web/views/customers.py @@ -2,7 +2,7 @@ ################################################################################ # # Sideshow -- Case/Special Order Tracker -# Copyright © 2024 Lance Edgar +# Copyright © 2024-2025 Lance Edgar # # This file is part of Sideshow. # @@ -184,7 +184,6 @@ class LocalCustomerView(MasterView): def objectify(self, form): """ """ - enum = self.app.enum customer = super().objectify(form) customer.full_name = self.app.make_full_name( @@ -389,9 +388,9 @@ class PendingCustomerView(MasterView): model_title = self.get_model_title() # avoid deleting if still referenced by order(s) - for order in customer.orders: + if list(customer.orders): self.request.session.flash( - f"Cannot delete {model_title} still attached " "to Order(s)", "warning" + f"Cannot delete {model_title} still attached to Order(s)", "warning" ) raise self.redirect(self.get_action_url("view", customer)) diff --git a/src/sideshow/web/views/orders.py b/src/sideshow/web/views/orders.py index dc5fbd8..2d05d5e 100644 --- a/src/sideshow/web/views/orders.py +++ b/src/sideshow/web/views/orders.py @@ -224,7 +224,6 @@ class OrderView(MasterView): * :meth:`submit_order()` """ model = self.app.model - enum = self.app.enum session = self.Session() batch = self.get_current_batch() self.creating = True @@ -915,7 +914,6 @@ class OrderView(MasterView): row.unit_price_sale ) if row.sale_ends: - sale_ends = row.sale_ends data["sale_ends"] = str(row.sale_ends) data["sale_ends_display"] = self.app.render_date(row.sale_ends) @@ -1552,10 +1550,8 @@ class OrderItemView(MasterView): View which changes status for an order item. This is POST-only; will redirect back to the item view. """ - model = self.app.model enum = self.app.enum main_item = self.get_instance() - session = self.Session() redirect = self.redirect(self.get_action_url("view", main_item)) extra_note = self.request.POST.get("note") diff --git a/src/sideshow/web/views/products.py b/src/sideshow/web/views/products.py index a205977..b0d52f0 100644 --- a/src/sideshow/web/views/products.py +++ b/src/sideshow/web/views/products.py @@ -108,7 +108,6 @@ class LocalProductView(MasterView): def configure_form(self, f): """ """ super().configure_form(f) - enum = self.app.enum product = f.model_instance # external_id @@ -322,7 +321,6 @@ class PendingProductView(MasterView): def configure_form(self, f): """ """ super().configure_form(f) - enum = self.app.enum product = f.model_instance # product_id