fix: fix 'missing-class-docstring' and 'missing-function-docstring' for pylint
This commit is contained in:
		
							parent
							
								
									1374910d65
								
							
						
					
					
						commit
						b2beeb4df3
					
				
					 12 changed files with 33 additions and 23 deletions
				
			
		| 
						 | 
					@ -15,5 +15,3 @@ disable=fixme,
 | 
				
			||||||
        implicit-str-concat,
 | 
					        implicit-str-concat,
 | 
				
			||||||
        inconsistent-return-statements,
 | 
					        inconsistent-return-statements,
 | 
				
			||||||
        invalid-name,
 | 
					        invalid-name,
 | 
				
			||||||
        missing-class-docstring,
 | 
					 | 
				
			||||||
        missing-function-docstring,
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
| 
						 | 
					@ -95,7 +95,9 @@ class NewOrderBatch(model.BatchMixin, model.Base):
 | 
				
			||||||
    local_customer_uuid = sa.Column(model.UUID(), nullable=True)
 | 
					    local_customer_uuid = sa.Column(model.UUID(), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @declared_attr
 | 
					    @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(
 | 
					        return orm.relationship(
 | 
				
			||||||
            "LocalCustomer",
 | 
					            "LocalCustomer",
 | 
				
			||||||
            back_populates="new_order_batches",
 | 
					            back_populates="new_order_batches",
 | 
				
			||||||
| 
						 | 
					@ -111,7 +113,9 @@ class NewOrderBatch(model.BatchMixin, model.Base):
 | 
				
			||||||
    pending_customer_uuid = sa.Column(model.UUID(), nullable=True)
 | 
					    pending_customer_uuid = sa.Column(model.UUID(), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @declared_attr
 | 
					    @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(
 | 
					        return orm.relationship(
 | 
				
			||||||
            "PendingCustomer",
 | 
					            "PendingCustomer",
 | 
				
			||||||
            back_populates="new_order_batches",
 | 
					            back_populates="new_order_batches",
 | 
				
			||||||
| 
						 | 
					@ -222,7 +226,9 @@ class NewOrderBatchRow(model.BatchRowMixin, model.Base):
 | 
				
			||||||
    local_product_uuid = sa.Column(model.UUID(), nullable=True)
 | 
					    local_product_uuid = sa.Column(model.UUID(), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @declared_attr
 | 
					    @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(
 | 
					        return orm.relationship(
 | 
				
			||||||
            "LocalProduct",
 | 
					            "LocalProduct",
 | 
				
			||||||
            back_populates="new_order_batch_rows",
 | 
					            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)
 | 
					    pending_product_uuid = sa.Column(model.UUID(), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @declared_attr
 | 
					    @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(
 | 
					        return orm.relationship(
 | 
				
			||||||
            "PendingProduct",
 | 
					            "PendingProduct",
 | 
				
			||||||
            back_populates="new_order_batch_rows",
 | 
					            back_populates="new_order_batch_rows",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -28,6 +28,10 @@ from wuttaweb import testing as base
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class WebTestCase(base.WebTestCase):
 | 
					class WebTestCase(base.WebTestCase):
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					    Custom class for web tests; it configures defaults specific to
 | 
				
			||||||
 | 
					    Sideshow.
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def make_config(self, **kwargs):
 | 
					    def make_config(self, **kwargs):
 | 
				
			||||||
        config = super().make_config(**kwargs)
 | 
					        config = super().make_config(**kwargs)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
| 
						 | 
					@ -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("sideshow.web.static")
 | 
				
			||||||
    config.include("wuttaweb.subscribers")
 | 
					    config.include("wuttaweb.subscribers")
 | 
				
			||||||
    config.include("sideshow.web.views")
 | 
					    config.include("sideshow.web.views")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
| 
						 | 
					@ -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')
 | 
					# 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.include("wuttaweb.static")
 | 
				
			||||||
    config.add_static_view("sideshow", "sideshow.web:static", cache_max_age=3600)
 | 
					    config.add_static_view("sideshow", "sideshow.web:static", cache_max_age=3600)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,7 +27,7 @@ Sideshow Views
 | 
				
			||||||
from wuttaweb.views import essential
 | 
					from wuttaweb.views import essential
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def includeme(config):
 | 
					def includeme(config):  # pylint: disable=missing-function-docstring
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # core views for wuttaweb
 | 
					    # core views for wuttaweb
 | 
				
			||||||
    essential.defaults(
 | 
					    essential.defaults(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -214,7 +214,7 @@ class NewOrderBatchView(BatchMasterView):
 | 
				
			||||||
        return buttons
 | 
					        return buttons
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def defaults(config, **kwargs):
 | 
					def defaults(config, **kwargs):  # pylint: disable=missing-function-docstring
 | 
				
			||||||
    base = globals()
 | 
					    base = globals()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    NewOrderBatchView = kwargs.get(  # pylint: disable=redefined-outer-name
 | 
					    NewOrderBatchView = kwargs.get(  # pylint: disable=redefined-outer-name
 | 
				
			||||||
| 
						 | 
					@ -223,5 +223,5 @@ def defaults(config, **kwargs):
 | 
				
			||||||
    NewOrderBatchView.defaults(config)
 | 
					    NewOrderBatchView.defaults(config)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def includeme(config):
 | 
					def includeme(config):  # pylint: disable=missing-function-docstring
 | 
				
			||||||
    defaults(config)
 | 
					    defaults(config)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -101,5 +101,5 @@ class CommonView(base.CommonView):
 | 
				
			||||||
            auth.grant_permission(admin, perm)
 | 
					            auth.grant_permission(admin, perm)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def includeme(config):
 | 
					def includeme(config):  # pylint: disable=missing-function-docstring
 | 
				
			||||||
    base.defaults(config, **{"CommonView": CommonView})
 | 
					    base.defaults(config, **{"CommonView": CommonView})
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -412,7 +412,7 @@ class PendingCustomerView(MasterView):
 | 
				
			||||||
        super().delete_instance(customer)
 | 
					        super().delete_instance(customer)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def defaults(config, **kwargs):
 | 
					def defaults(config, **kwargs):  # pylint: disable=missing-function-docstring
 | 
				
			||||||
    base = globals()
 | 
					    base = globals()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    LocalCustomerView = kwargs.get(  # pylint: disable=redefined-outer-name
 | 
					    LocalCustomerView = kwargs.get(  # pylint: disable=redefined-outer-name
 | 
				
			||||||
| 
						 | 
					@ -426,5 +426,5 @@ def defaults(config, **kwargs):
 | 
				
			||||||
    PendingCustomerView.defaults(config)
 | 
					    PendingCustomerView.defaults(config)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def includeme(config):
 | 
					def includeme(config):  # pylint: disable=missing-function-docstring
 | 
				
			||||||
    defaults(config)
 | 
					    defaults(config)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2371,7 +2371,7 @@ class DeliveryView(OrderItemView):
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def defaults(config, **kwargs):
 | 
					def defaults(config, **kwargs):  # pylint: disable=missing-function-docstring
 | 
				
			||||||
    base = globals()
 | 
					    base = globals()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    OrderView = kwargs.get(  # pylint: disable=redefined-outer-name
 | 
					    OrderView = kwargs.get(  # pylint: disable=redefined-outer-name
 | 
				
			||||||
| 
						 | 
					@ -2405,5 +2405,5 @@ def defaults(config, **kwargs):
 | 
				
			||||||
    DeliveryView.defaults(config)
 | 
					    DeliveryView.defaults(config)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def includeme(config):
 | 
					def includeme(config):  # pylint: disable=missing-function-docstring
 | 
				
			||||||
    defaults(config)
 | 
					    defaults(config)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -578,7 +578,7 @@ class PendingProductView(MasterView):
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def defaults(config, **kwargs):
 | 
					def defaults(config, **kwargs):  # pylint: disable=missing-function-docstring
 | 
				
			||||||
    base = globals()
 | 
					    base = globals()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    LocalProductView = kwargs.get(  # pylint: disable=redefined-outer-name
 | 
					    LocalProductView = kwargs.get(  # pylint: disable=redefined-outer-name
 | 
				
			||||||
| 
						 | 
					@ -592,5 +592,5 @@ def defaults(config, **kwargs):
 | 
				
			||||||
    PendingProductView.defaults(config)
 | 
					    PendingProductView.defaults(config)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def includeme(config):
 | 
					def includeme(config):  # pylint: disable=missing-function-docstring
 | 
				
			||||||
    defaults(config)
 | 
					    defaults(config)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,7 @@ class StoreView(MasterView):
 | 
				
			||||||
            node.raise_invalid("Name must be unique")
 | 
					            node.raise_invalid("Name must be unique")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def defaults(config, **kwargs):
 | 
					def defaults(config, **kwargs):  # pylint: disable=missing-function-docstring
 | 
				
			||||||
    base = globals()
 | 
					    base = globals()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    StoreView = kwargs.get(  # pylint: disable=redefined-outer-name
 | 
					    StoreView = kwargs.get(  # pylint: disable=redefined-outer-name
 | 
				
			||||||
| 
						 | 
					@ -117,5 +117,5 @@ def defaults(config, **kwargs):
 | 
				
			||||||
    StoreView.defaults(config)
 | 
					    StoreView.defaults(config)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def includeme(config):
 | 
					def includeme(config):  # pylint: disable=missing-function-docstring
 | 
				
			||||||
    defaults(config)
 | 
					    defaults(config)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue