fix: resolve variable shadowing of error in ValidationError handler (#356)

This commit is contained in:
UmranPros
2026-06-05 20:16:26 +05:30
committed by GitHub
parent 61c59f7227
commit a3dbfd21e6
+4 -2
View File
@@ -195,8 +195,10 @@ def run():
except ValidationError as error: except ValidationError as error:
print(f"[red]Configuration contains [bold]{error.error_count()}[/] errors:[/]") print(f"[red]Configuration contains [bold]{error.error_count()}[/] errors:[/]")
for error in error.errors(): for error_detail in error.errors():
print(f"[bold]{error['loc'][0]}[/]: [yellow]{error['msg']}[/]") print(
f"[bold]{error_detail['loc'][0]}[/]: [yellow]{error_detail['msg']}[/]"
)
print() print()
print( print(