3
0
Fork 0

fix: fix 'too-many-branches' for pylint

probably should actually refactor some of this? but ignore for now
This commit is contained in:
Lance Edgar 2025-08-31 20:16:23 -05:00
parent e6c495b40d
commit 6424432f1b
7 changed files with 9 additions and 8 deletions

View file

@ -4,5 +4,6 @@
disable=all
enable=
inconsistent-return-statements,
too-many-branches,
too-many-instance-attributes,
too-many-return-statements,

View file

@ -777,7 +777,7 @@ class Form: # pylint: disable=too-many-instance-attributes
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
form, generating it automatically if necessary.

View file

@ -1462,7 +1462,7 @@ class Grid: # pylint: disable=too-many-instance-attributes
# 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.

View file

@ -2,7 +2,7 @@
################################################################################
#
# wuttaweb -- Web App for Wutta Framework
# Copyright © 2024 Lance Edgar
# Copyright © 2024-2025 Lance Edgar
#
# This file is part of Wutta Framework.
#
@ -213,7 +213,7 @@ class MenuHandler(GenericHandler):
# 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
set. It first calls :meth:`make_menus()` to get the basic

View file

@ -141,7 +141,7 @@ def get_form_data(request):
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,
key,
configured_only=False,
@ -281,7 +281,7 @@ def get_libver( # pylint: disable=too-many-return-statements
return None
def get_liburl( # pylint: disable=too-many-return-statements
def get_liburl( # pylint: disable=too-many-return-statements,too-many-branches
request,
key,
configured_only=False,

View file

@ -157,7 +157,7 @@ class BatchMasterView(MasterView):
return f"{batch.id_str} {batch.description}"
return batch.id_str
def configure_form(self, f):
def configure_form(self, f): # pylint: disable=too-many-branches
""" """
super().configure_form(f)
batch = f.model_instance

View file

@ -173,7 +173,7 @@ class EmailSettingView(MasterView):
# enabled
f.set_node("enabled", colander.Boolean())
def persist(self, setting):
def persist(self, setting): # pylint: disable=too-many-branches
""" """
session = self.Session()
key = self.request.matchdict["key"]