From e16fa6b3d280d228f21d77f9fa7d4fbf9d08016a Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Wed, 4 Feb 2026 07:32:15 +0000 Subject: [PATCH] fix: resolve CI/CD test failures and linting issues --- config_convert/utils/flatten.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/config_convert/utils/flatten.py b/config_convert/utils/flatten.py index 2c6a67e..285ce65 100644 --- a/config_convert/utils/flatten.py +++ b/config_convert/utils/flatten.py @@ -1,8 +1,6 @@ """Utilities for flattening and unflattening nested dictionaries.""" -import re -from collections.abc import MutableMapping -from typing import Any, Dict, List, Tuple +from typing import Any, Dict, List def flatten_dict(data: Dict[str, Any], parent_key: str = "", sep: str = ".") -> Dict[str, Any]: @@ -104,7 +102,6 @@ def _split_key(key: str, sep: str) -> List[str]: def _set_nested(d: Any, parts: List[str], value: Any) -> None: """Set a value in a nested structure, creating intermediate dicts or lists as needed.""" current = d - path = [] # Track the path to enable modification at the right level for i, part in enumerate(parts[:-1]): if isinstance(current, list): @@ -137,7 +134,7 @@ def _set_nested(d: Any, parts: List[str], value: Any) -> None: current[part] = {} current = current[part] else: - raise ValueError(f"Cannot traverse through non-dict/list object") + raise ValueError("Cannot traverse through non-dict/list object") last_part = parts[-1] if isinstance(current, list):