Skip to content

Commit 063b71d

Browse files
committed
unnecessary use of initerrordetails
1 parent 8a5e773 commit 063b71d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pydantic_settings/main.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,7 @@ def _settings_build_values(
431431
ctx = line.get("ctx", {})
432432
ctx["source"] = source_name
433433
line['ctx'] = ctx
434-
details = InitErrorDetails(**line)
435-
all_line_errors.append(details)
434+
all_line_errors.append(line)
436435

437436
if validate_each_source:
438437
try:
@@ -442,8 +441,7 @@ def _settings_build_values(
442441
for line in line_errors:
443442
if line.get("type", "") != "missing":
444443
continue
445-
details = InitErrorDetails(**line)
446-
all_line_errors.append(details)
444+
all_line_errors.append(line)
447445

448446
if all_line_errors and validate_each_source:
449447
raise ValidationError.from_exception_data(

0 commit comments

Comments
 (0)