fix: fix 'unused-variable' for pylint

This commit is contained in:
Lance Edgar 2025-09-01 13:58:12 -05:00
parent 7833ad502a
commit 2d61d6aecf
7 changed files with 5 additions and 16 deletions

View file

@ -32,4 +32,3 @@ disable=fixme,
unnecessary-lambda-assignment, unnecessary-lambda-assignment,
unused-argument, unused-argument,
unused-import, unused-import,
unused-variable,

View file

@ -597,7 +597,6 @@ class NewOrderBatchHandler(BatchHandler):
:returns: List of product info dicts. :returns: List of product info dicts.
""" """
model = self.app.model
session = self.app.get_session(batch) session = self.app.get_session(batch)
use_local = self.use_local_products() use_local = self.use_local_products()
user = user or batch.created_by user = user or batch.created_by
@ -1205,7 +1204,6 @@ class NewOrderBatchHandler(BatchHandler):
:returns: :class:`~sideshow.db.model.orders.Order` instance. :returns: :class:`~sideshow.db.model.orders.Order` instance.
""" """
model = self.app.model model = self.app.model
enum = self.app.enum
session = self.app.get_session(batch) session = self.app.get_session(batch)
batch_fields = [ batch_fields = [

View file

@ -2,7 +2,7 @@
################################################################################ ################################################################################
# #
# Sideshow -- Case/Special Order Tracker # Sideshow -- Case/Special Order Tracker
# Copyright © 2024 Lance Edgar # Copyright © 2024-2025 Lance Edgar
# #
# This file is part of Sideshow. # This file is part of Sideshow.
# #
@ -41,7 +41,7 @@ def main(global_config, **settings):
) )
# make config objects # 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) pyramid_config = base.make_pyramid_config(settings)
# bring in the rest of Sideshow # bring in the rest of Sideshow

View file

@ -167,7 +167,6 @@ class NewOrderBatchView(BatchMasterView):
def configure_row_grid(self, g): def configure_row_grid(self, g):
""" """ """ """
super().configure_row_grid(g) super().configure_row_grid(g)
enum = self.app.enum
# TODO # TODO
# order_uom # order_uom

View file

@ -2,7 +2,7 @@
################################################################################ ################################################################################
# #
# Sideshow -- Case/Special Order Tracker # Sideshow -- Case/Special Order Tracker
# Copyright © 2024 Lance Edgar # Copyright © 2024-2025 Lance Edgar
# #
# This file is part of Sideshow. # This file is part of Sideshow.
# #
@ -184,7 +184,6 @@ class LocalCustomerView(MasterView):
def objectify(self, form): def objectify(self, form):
""" """ """ """
enum = self.app.enum
customer = super().objectify(form) customer = super().objectify(form)
customer.full_name = self.app.make_full_name( customer.full_name = self.app.make_full_name(
@ -389,9 +388,9 @@ class PendingCustomerView(MasterView):
model_title = self.get_model_title() model_title = self.get_model_title()
# avoid deleting if still referenced by order(s) # avoid deleting if still referenced by order(s)
for order in customer.orders: if list(customer.orders):
self.request.session.flash( 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)) raise self.redirect(self.get_action_url("view", customer))

View file

@ -224,7 +224,6 @@ class OrderView(MasterView):
* :meth:`submit_order()` * :meth:`submit_order()`
""" """
model = self.app.model model = self.app.model
enum = self.app.enum
session = self.Session() session = self.Session()
batch = self.get_current_batch() batch = self.get_current_batch()
self.creating = True self.creating = True
@ -915,7 +914,6 @@ class OrderView(MasterView):
row.unit_price_sale row.unit_price_sale
) )
if row.sale_ends: if row.sale_ends:
sale_ends = row.sale_ends
data["sale_ends"] = str(row.sale_ends) data["sale_ends"] = str(row.sale_ends)
data["sale_ends_display"] = self.app.render_date(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 View which changes status for an order item. This is
POST-only; will redirect back to the item view. POST-only; will redirect back to the item view.
""" """
model = self.app.model
enum = self.app.enum enum = self.app.enum
main_item = self.get_instance() main_item = self.get_instance()
session = self.Session()
redirect = self.redirect(self.get_action_url("view", main_item)) redirect = self.redirect(self.get_action_url("view", main_item))
extra_note = self.request.POST.get("note") extra_note = self.request.POST.get("note")

View file

@ -108,7 +108,6 @@ class LocalProductView(MasterView):
def configure_form(self, f): def configure_form(self, f):
""" """ """ """
super().configure_form(f) super().configure_form(f)
enum = self.app.enum
product = f.model_instance product = f.model_instance
# external_id # external_id
@ -322,7 +321,6 @@ class PendingProductView(MasterView):
def configure_form(self, f): def configure_form(self, f):
""" """ """ """
super().configure_form(f) super().configure_form(f)
enum = self.app.enum
product = f.model_instance product = f.model_instance
# product_id # product_id