fix: fix 'too-many-branches' for pylint
probably should actually refactor some of this? but ignore for now
This commit is contained in:
parent
e6c495b40d
commit
6424432f1b
7 changed files with 9 additions and 8 deletions
|
@ -4,5 +4,6 @@
|
||||||
disable=all
|
disable=all
|
||||||
enable=
|
enable=
|
||||||
inconsistent-return-statements,
|
inconsistent-return-statements,
|
||||||
|
too-many-branches,
|
||||||
too-many-instance-attributes,
|
too-many-instance-attributes,
|
||||||
too-many-return-statements,
|
too-many-return-statements,
|
||||||
|
|
|
@ -777,7 +777,7 @@ class Form: # pylint: disable=too-many-instance-attributes
|
||||||
self.config, model_class=model_class or self.model_class
|
self.config, model_class=model_class or self.model_class
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_schema(self):
|
def get_schema(self): # pylint: disable=too-many-branches
|
||||||
"""
|
"""
|
||||||
Return the :class:`colander:colander.Schema` object for the
|
Return the :class:`colander:colander.Schema` object for the
|
||||||
form, generating it automatically if necessary.
|
form, generating it automatically if necessary.
|
||||||
|
|
|
@ -1462,7 +1462,7 @@ class Grid: # pylint: disable=too-many-instance-attributes
|
||||||
# configuration methods
|
# configuration methods
|
||||||
##############################
|
##############################
|
||||||
|
|
||||||
def load_settings(self, persist=True):
|
def load_settings(self, persist=True): # pylint: disable=too-many-branches
|
||||||
"""
|
"""
|
||||||
Load all effective settings for the grid.
|
Load all effective settings for the grid.
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# wuttaweb -- Web App for Wutta Framework
|
# wuttaweb -- Web App for Wutta Framework
|
||||||
# Copyright © 2024 Lance Edgar
|
# Copyright © 2024-2025 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Wutta Framework.
|
# This file is part of Wutta Framework.
|
||||||
#
|
#
|
||||||
|
@ -213,7 +213,7 @@ class MenuHandler(GenericHandler):
|
||||||
# default internal logic
|
# default internal logic
|
||||||
##############################
|
##############################
|
||||||
|
|
||||||
def do_make_menus(self, request, **kwargs):
|
def do_make_menus(self, request, **kwargs): # pylint: disable=too-many-branches
|
||||||
"""
|
"""
|
||||||
This method is responsible for constructing the final menu
|
This method is responsible for constructing the final menu
|
||||||
set. It first calls :meth:`make_menus()` to get the basic
|
set. It first calls :meth:`make_menus()` to get the basic
|
||||||
|
|
|
@ -141,7 +141,7 @@ def get_form_data(request):
|
||||||
return request.POST
|
return request.POST
|
||||||
|
|
||||||
|
|
||||||
def get_libver( # pylint: disable=too-many-return-statements
|
def get_libver( # pylint: disable=too-many-return-statements,too-many-branches
|
||||||
request,
|
request,
|
||||||
key,
|
key,
|
||||||
configured_only=False,
|
configured_only=False,
|
||||||
|
@ -281,7 +281,7 @@ def get_libver( # pylint: disable=too-many-return-statements
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def get_liburl( # pylint: disable=too-many-return-statements
|
def get_liburl( # pylint: disable=too-many-return-statements,too-many-branches
|
||||||
request,
|
request,
|
||||||
key,
|
key,
|
||||||
configured_only=False,
|
configured_only=False,
|
||||||
|
|
|
@ -157,7 +157,7 @@ class BatchMasterView(MasterView):
|
||||||
return f"{batch.id_str} {batch.description}"
|
return f"{batch.id_str} {batch.description}"
|
||||||
return batch.id_str
|
return batch.id_str
|
||||||
|
|
||||||
def configure_form(self, f):
|
def configure_form(self, f): # pylint: disable=too-many-branches
|
||||||
""" """
|
""" """
|
||||||
super().configure_form(f)
|
super().configure_form(f)
|
||||||
batch = f.model_instance
|
batch = f.model_instance
|
||||||
|
|
|
@ -173,7 +173,7 @@ class EmailSettingView(MasterView):
|
||||||
# enabled
|
# enabled
|
||||||
f.set_node("enabled", colander.Boolean())
|
f.set_node("enabled", colander.Boolean())
|
||||||
|
|
||||||
def persist(self, setting):
|
def persist(self, setting): # pylint: disable=too-many-branches
|
||||||
""" """
|
""" """
|
||||||
session = self.Session()
|
session = self.Session()
|
||||||
key = self.request.matchdict["key"]
|
key = self.request.matchdict["key"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue