fix: resolve variable shadowing of error in ValidationError handler (#356)
This commit is contained in:
+4
-2
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user