Skip to content

Commit dcec977

Browse files
committed
coderabbit nitpicks
1 parent d5bf086 commit dcec977

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def _apply_transform(
124124

125125
try:
126126
return transform(value)
127-
except Exception as e: # pylint: disable=broad-exception-caught
127+
except (ValueError, TypeError, AttributeError) as e:
128128
# Intentionally catch all exceptions to ensure config loading never fails
129129
logger.warning("Transform failed for %s: %s, using default", config_name, e)
130130
return default
@@ -292,7 +292,7 @@ def print_config_summary() -> None:
292292
print(f" CALENDAR_CACHE_EXPIRY_HOURS: {CALENDAR_CACHE_EXPIRY_HOURS}h")
293293
print(f" CACHE_DIR: {CACHE_DIR}")
294294
print("\nConfiguration Sources:")
295-
if config_file.exists():
295+
if config_file is not None and config_file.exists():
296296
print(f" User config loaded from: {config_file}")
297297
else:
298298
print(" User config: Not found (using defaults)")

0 commit comments

Comments
 (0)