diff --git a/.pylintrc b/.pylintrc index ad12f89..a9e1cd7 100644 --- a/.pylintrc +++ b/.pylintrc @@ -15,5 +15,3 @@ disable=fixme, implicit-str-concat, inconsistent-return-statements, invalid-name, - missing-class-docstring, - missing-function-docstring, diff --git a/src/sideshow/db/model/batch/neworder.py b/src/sideshow/db/model/batch/neworder.py index b300a8d..c5dfb94 100644 --- a/src/sideshow/db/model/batch/neworder.py +++ b/src/sideshow/db/model/batch/neworder.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. # @@ -95,7 +95,9 @@ class NewOrderBatch(model.BatchMixin, model.Base): local_customer_uuid = sa.Column(model.UUID(), nullable=True) @declared_attr - def local_customer(cls): # pylint: disable=no-self-argument + def local_customer( # pylint: disable=no-self-argument,missing-function-docstring + cls, + ): return orm.relationship( "LocalCustomer", back_populates="new_order_batches", @@ -111,7 +113,9 @@ class NewOrderBatch(model.BatchMixin, model.Base): pending_customer_uuid = sa.Column(model.UUID(), nullable=True) @declared_attr - def pending_customer(cls): # pylint: disable=no-self-argument + def pending_customer( # pylint: disable=no-self-argument,missing-function-docstring + cls, + ): return orm.relationship( "PendingCustomer", back_populates="new_order_batches", @@ -222,7 +226,9 @@ class NewOrderBatchRow(model.BatchRowMixin, model.Base): local_product_uuid = sa.Column(model.UUID(), nullable=True) @declared_attr - def local_product(cls): # pylint: disable=no-self-argument + def local_product( # pylint: disable=no-self-argument,missing-function-docstring + cls, + ): return orm.relationship( "LocalProduct", back_populates="new_order_batch_rows", @@ -238,7 +244,9 @@ class NewOrderBatchRow(model.BatchRowMixin, model.Base): pending_product_uuid = sa.Column(model.UUID(), nullable=True) @declared_attr - def pending_product(cls): # pylint: disable=no-self-argument + def pending_product( # pylint: disable=no-self-argument,missing-function-docstring + cls, + ): return orm.relationship( "PendingProduct", back_populates="new_order_batch_rows", diff --git a/src/sideshow/testing.py b/src/sideshow/testing.py index f1fccfd..667df18 100644 --- a/src/sideshow/testing.py +++ b/src/sideshow/testing.py @@ -28,6 +28,10 @@ from wuttaweb import testing as base class WebTestCase(base.WebTestCase): + """ + Custom class for web tests; it configures defaults specific to + Sideshow. + """ def make_config(self, **kwargs): config = super().make_config(**kwargs) diff --git a/src/sideshow/web/__init__.py b/src/sideshow/web/__init__.py index 34f0b6f..61135e5 100644 --- a/src/sideshow/web/__init__.py +++ b/src/sideshow/web/__init__.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. # @@ -25,7 +25,7 @@ Sideshow web app """ -def includeme(config): +def includeme(config): # pylint: disable=missing-function-docstring config.include("sideshow.web.static") config.include("wuttaweb.subscribers") config.include("sideshow.web.views") diff --git a/src/sideshow/web/static/__init__.py b/src/sideshow/web/static/__init__.py index 43d30aa..651042c 100644 --- a/src/sideshow/web/static/__init__.py +++ b/src/sideshow/web/static/__init__.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. # @@ -43,6 +43,6 @@ fontawesome_js = Resource(libcache, "fontawesome-5.3.1-all.min.js") # bb_vue_fontawesome_js = Resource(libcache, 'vue-fontawesome-3.0.6.index.es.js') -def includeme(config): +def includeme(config): # pylint: disable=missing-function-docstring config.include("wuttaweb.static") config.add_static_view("sideshow", "sideshow.web:static", cache_max_age=3600) diff --git a/src/sideshow/web/views/__init__.py b/src/sideshow/web/views/__init__.py index 3879f8c..f4550ef 100644 --- a/src/sideshow/web/views/__init__.py +++ b/src/sideshow/web/views/__init__.py @@ -27,7 +27,7 @@ Sideshow Views from wuttaweb.views import essential -def includeme(config): +def includeme(config): # pylint: disable=missing-function-docstring # core views for wuttaweb essential.defaults( diff --git a/src/sideshow/web/views/batch/neworder.py b/src/sideshow/web/views/batch/neworder.py index 05fe99f..115239d 100644 --- a/src/sideshow/web/views/batch/neworder.py +++ b/src/sideshow/web/views/batch/neworder.py @@ -214,7 +214,7 @@ class NewOrderBatchView(BatchMasterView): return buttons -def defaults(config, **kwargs): +def defaults(config, **kwargs): # pylint: disable=missing-function-docstring base = globals() NewOrderBatchView = kwargs.get( # pylint: disable=redefined-outer-name @@ -223,5 +223,5 @@ def defaults(config, **kwargs): NewOrderBatchView.defaults(config) -def includeme(config): +def includeme(config): # pylint: disable=missing-function-docstring defaults(config) diff --git a/src/sideshow/web/views/common.py b/src/sideshow/web/views/common.py index c0debb0..a5da3bd 100644 --- a/src/sideshow/web/views/common.py +++ b/src/sideshow/web/views/common.py @@ -101,5 +101,5 @@ class CommonView(base.CommonView): auth.grant_permission(admin, perm) -def includeme(config): +def includeme(config): # pylint: disable=missing-function-docstring base.defaults(config, **{"CommonView": CommonView}) diff --git a/src/sideshow/web/views/customers.py b/src/sideshow/web/views/customers.py index 0631be4..52bc36b 100644 --- a/src/sideshow/web/views/customers.py +++ b/src/sideshow/web/views/customers.py @@ -412,7 +412,7 @@ class PendingCustomerView(MasterView): super().delete_instance(customer) -def defaults(config, **kwargs): +def defaults(config, **kwargs): # pylint: disable=missing-function-docstring base = globals() LocalCustomerView = kwargs.get( # pylint: disable=redefined-outer-name @@ -426,5 +426,5 @@ def defaults(config, **kwargs): PendingCustomerView.defaults(config) -def includeme(config): +def includeme(config): # pylint: disable=missing-function-docstring defaults(config) diff --git a/src/sideshow/web/views/orders.py b/src/sideshow/web/views/orders.py index 55da5cb..b1914ac 100644 --- a/src/sideshow/web/views/orders.py +++ b/src/sideshow/web/views/orders.py @@ -2371,7 +2371,7 @@ class DeliveryView(OrderItemView): ) -def defaults(config, **kwargs): +def defaults(config, **kwargs): # pylint: disable=missing-function-docstring base = globals() OrderView = kwargs.get( # pylint: disable=redefined-outer-name @@ -2405,5 +2405,5 @@ def defaults(config, **kwargs): DeliveryView.defaults(config) -def includeme(config): +def includeme(config): # pylint: disable=missing-function-docstring defaults(config) diff --git a/src/sideshow/web/views/products.py b/src/sideshow/web/views/products.py index 2da8225..6ead48a 100644 --- a/src/sideshow/web/views/products.py +++ b/src/sideshow/web/views/products.py @@ -578,7 +578,7 @@ class PendingProductView(MasterView): ) -def defaults(config, **kwargs): +def defaults(config, **kwargs): # pylint: disable=missing-function-docstring base = globals() LocalProductView = kwargs.get( # pylint: disable=redefined-outer-name @@ -592,5 +592,5 @@ def defaults(config, **kwargs): PendingProductView.defaults(config) -def includeme(config): +def includeme(config): # pylint: disable=missing-function-docstring defaults(config) diff --git a/src/sideshow/web/views/stores.py b/src/sideshow/web/views/stores.py index 1b07ff7..06c749f 100644 --- a/src/sideshow/web/views/stores.py +++ b/src/sideshow/web/views/stores.py @@ -108,7 +108,7 @@ class StoreView(MasterView): node.raise_invalid("Name must be unique") -def defaults(config, **kwargs): +def defaults(config, **kwargs): # pylint: disable=missing-function-docstring base = globals() StoreView = kwargs.get( # pylint: disable=redefined-outer-name @@ -117,5 +117,5 @@ def defaults(config, **kwargs): StoreView.defaults(config) -def includeme(config): +def includeme(config): # pylint: disable=missing-function-docstring defaults(config)