From a3dbfd21e6928de91cf1dad32588e111c3d7c4e7 Mon Sep 17 00:00:00 2001 From: UmranPros <152087084+umran666@users.noreply.github.com> Date: Fri, 5 Jun 2026 20:16:26 +0530 Subject: [PATCH] fix: resolve variable shadowing of error in ValidationError handler (#356) --- src/heretic/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/heretic/main.py b/src/heretic/main.py index baada1e..ffe0748 100644 --- a/src/heretic/main.py +++ b/src/heretic/main.py @@ -195,8 +195,10 @@ def run(): except ValidationError as error: print(f"[red]Configuration contains [bold]{error.error_count()}[/] errors:[/]") - for error in error.errors(): - print(f"[bold]{error['loc'][0]}[/]: [yellow]{error['msg']}[/]") + for error_detail in error.errors(): + print( + f"[bold]{error_detail['loc'][0]}[/]: [yellow]{error_detail['msg']}[/]" + ) print() print(