From e8842637791231d33da6ea0b1e94085a4440c30c Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 1 Sep 2025 14:22:26 -0500 Subject: [PATCH] fix: fix 'too-few-public-methods' for pylint --- .pylintrc | 1 - src/sideshow/db/model/customers.py | 12 ++++++++---- src/sideshow/db/model/orders.py | 4 ++-- src/sideshow/db/model/products.py | 8 +++++--- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.pylintrc b/.pylintrc index 2388fdc..ca9a1b2 100644 --- a/.pylintrc +++ b/.pylintrc @@ -22,4 +22,3 @@ disable=fixme, no-self-argument, redefined-outer-name, singleton-comparison, - too-few-public-methods, diff --git a/src/sideshow/db/model/customers.py b/src/sideshow/db/model/customers.py index b106a13..deb081c 100644 --- a/src/sideshow/db/model/customers.py +++ b/src/sideshow/db/model/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. # @@ -34,7 +34,7 @@ from wuttjamaican.db import model from sideshow.enum import PendingCustomerStatus -class CustomerMixin: +class CustomerMixin: # pylint: disable=too-few-public-methods """ Base class for customer tables. This has shared columns, used by e.g.: @@ -86,7 +86,9 @@ class CustomerMixin: return self.full_name or "" -class LocalCustomer(CustomerMixin, model.Base): +class LocalCustomer( # pylint: disable=too-few-public-methods + CustomerMixin, model.Base +): """ This table contains the :term:`local customer` records. @@ -136,7 +138,9 @@ class LocalCustomer(CustomerMixin, model.Base): ) -class PendingCustomer(CustomerMixin, model.Base): +class PendingCustomer( # pylint: disable=too-few-public-methods + CustomerMixin, model.Base +): """ This table contains the :term:`pending customer` records, used when creating an :term:`order` for new/unknown customer. diff --git a/src/sideshow/db/model/orders.py b/src/sideshow/db/model/orders.py index c5c9218..bab70dc 100644 --- a/src/sideshow/db/model/orders.py +++ b/src/sideshow/db/model/orders.py @@ -33,7 +33,7 @@ from sqlalchemy.ext.orderinglist import ordering_list from wuttjamaican.db import model -class Order(model.Base): +class Order(model.Base): # pylint: disable=too-few-public-methods """ Represents an :term:`order` for a customer. Each order has one or more :attr:`items`. @@ -542,7 +542,7 @@ class OrderItem(model.Base): self.events.append(OrderItemEvent(**kwargs)) -class OrderItemEvent(model.Base): +class OrderItemEvent(model.Base): # pylint: disable=too-few-public-methods """ An event in the life of an :term:`order item`. """ diff --git a/src/sideshow/db/model/products.py b/src/sideshow/db/model/products.py index 6842104..1a90b69 100644 --- a/src/sideshow/db/model/products.py +++ b/src/sideshow/db/model/products.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. # @@ -179,7 +179,7 @@ class ProductMixin: return self.full_description -class LocalProduct(ProductMixin, model.Base): +class LocalProduct(ProductMixin, model.Base): # pylint: disable=too-few-public-methods """ This table contains the :term:`local product` records. @@ -228,7 +228,9 @@ class LocalProduct(ProductMixin, model.Base): ) -class PendingProduct(ProductMixin, model.Base): +class PendingProduct( # pylint: disable=too-few-public-methods + ProductMixin, model.Base +): """ This table contains the :term:`pending product` records, used when creating an :term:`order` for new/unknown product(s).