style: apply ruff formatting

This commit is contained in:
2026-02-04 01:28:45 +00:00
parent 2900fca30a
commit 34e07f6b7e
4 changed files with 17 additions and 11 deletions

View File

@@ -49,12 +49,14 @@ _GLOBAL_FIELD_TYPES: dict[str, type[Any]] = {
}
# Fields that cannot be loaded from config files (callables, complex objects)
_NON_LOADABLE_FIELDS: frozenset[str] = frozenset({
"key_extractor",
"exempt_when",
"on_blocked",
"backend",
})
_NON_LOADABLE_FIELDS: frozenset[str] = frozenset(
{
"key_extractor",
"exempt_when",
"on_blocked",
"backend",
}
)
class ConfigLoader:
@@ -200,7 +202,11 @@ class ConfigLoader:
value = value.strip()
# Remove surrounding quotes if present
if len(value) >= 2 and value[0] == value[-1] and value[0] in ('"', "'"):
if (
len(value) >= 2
and value[0] == value[-1]
and value[0] in ('"', "'")
):
value = value[1:-1]
env_vars[key] = value
@@ -261,7 +267,7 @@ class ConfigLoader:
for key, value in source.items():
if key.startswith(full_prefix):
field_name = key[len(full_prefix):].lower()
field_name = key[len(full_prefix) :].lower()
if field_name in field_types:
result[field_name] = value