Skip to content

Commit ab5eaf5

Browse files
committed
fix: Improve configuration loading logic
Used a dictionary comprehension for normalizing configuration keys during loading. This simplified the creation of the normalized configuration dictionary.
1 parent 578590c commit ab5eaf5

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/nextmeeting/cli.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,10 +1196,9 @@ def _load_config(path: Path) -> dict:
11961196

11971197
# Normalize keys: convert hyphens to underscores to match argparse behavior
11981198
# This allows both caldav-url and caldav_url in config files
1199-
normalized_config = {}
1200-
for key, value in config_data.items():
1201-
normalized_key = key.replace("-", "_")
1202-
normalized_config[normalized_key] = value
1199+
normalized_config = {
1200+
key.replace("-", "_"): value for key, value in config_data.items()
1201+
}
12031202

12041203
return normalized_config
12051204
except Exception: # noqa: BLE001

0 commit comments

Comments
 (0)