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,
|
||||
inconsistent-return-statements,
|
||||
invalid-name,
|
||||
missing-class-docstring,
|
||||
missing-function-docstring,
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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})
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue