From 0d143c5923b91397c58bc832acf521f8fc3bbf7c Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Thu, 5 Feb 2026 07:15:33 +0000 Subject: [PATCH] fix: resolve CI lint and type errors --- src/cli/cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/cli.py b/src/cli/cli.py index faaf274..7d7209d 100644 --- a/src/cli/cli.py +++ b/src/cli/cli.py @@ -240,9 +240,9 @@ def _set_nested_attr(obj, attr_path: str, value: Any) -> None: final_attr = parts[-1] if hasattr(current, final_attr): - attr = getattr(type(current), final_attr) - if hasattr(attr, "annotation"): - type_hint = attr.annotation + attr = getattr(type(current), final_attr, None) + if attr is not None and hasattr(attr, "annotation"): + type_hint = attr.annotation # type: ignore[attr-defined] if getattr(type_hint, "__origin__", None) is Union: type_hint = type_hint.__args__[0] if hasattr(type_hint, "__name__"):