3
0
Fork 0

fix: fix 'redefined-argument-from-local' for pylint

This commit is contained in:
Lance Edgar 2025-08-30 16:06:04 -05:00
parent 38e4ce628d
commit 4f6229e5d9
4 changed files with 16 additions and 15 deletions

View file

@ -3,5 +3,6 @@
[MESSAGES CONTROL]
disable=all
enable=dangerous-default-value,
redefined-argument-from-local,
unspecified-encoding,
unused-import,

View file

@ -285,14 +285,14 @@ class WuttaConfig:
# bring in any "required" files
requires = config.get(f'{self.appname}.config.require')
if requires:
for path in self.parse_list(requires):
self._load_ini_configs(path, configs, require=True)
for p in self.parse_list(requires):
self._load_ini_configs(p, configs, require=True)
# bring in any "included" files
includes = config.get(f'{self.appname}.config.include')
if includes:
for path in self.parse_list(includes):
self._load_ini_configs(path, configs, require=False)
for p in self.parse_list(includes):
self._load_ini_configs(p, configs, require=False)
def get_prioritized_files(self):
"""

View file

@ -2,7 +2,7 @@
################################################################################
#
# WuttJamaican -- Base package for Wutta Framework
# Copyright © 2023-2024 Lance Edgar
# Copyright © 2023-2025 Lance Edgar
#
# This file is part of Wutta Framework.
#
@ -652,8 +652,8 @@ class EmailHandler(GenericHandler):
:returns: True if this email type is enabled, otherwise false.
"""
for key in set([key, 'default']):
enabled = self.config.get_bool(f'{self.config.appname}.email.{key}.enabled')
for k in set([key, 'default']):
enabled = self.config.get_bool(f'{self.config.appname}.email.{k}.enabled')
if enabled is not None:
return enabled
return True

View file

@ -2,7 +2,7 @@
################################################################################
#
# WuttJamaican -- Base package for Wutta Framework
# Copyright © 2023-2024 Lance Edgar
# Copyright © 2023-2025 Lance Edgar
#
# This file is part of Wutta Framework.
#
@ -256,11 +256,11 @@ def parse_list(value):
parser.whitespace += ','
parser.whitespace_split = True
values = list(parser)
for i, value in enumerate(values):
if value.startswith('"') and value.endswith('"'):
values[i] = value[1:-1]
elif value.startswith("'") and value.endswith("'"):
values[i] = value[1:-1]
for i, val in enumerate(values):
if val.startswith('"') and val.endswith('"'):
values[i] = val[1:-1]
elif val.startswith("'") and val.endswith("'"):
values[i] = val[1:-1]
return values
@ -354,8 +354,8 @@ def resource_path(path):
package, filename = path.split(':')
ref = files(package) / filename
with as_file(ref) as path:
return str(path)
with as_file(ref) as p:
return str(p)
return path