Skip to content

Fix AttributeError with nested env vars for dict fields (#785)#786

Merged
hramezani merged 4 commits intomainfrom
fix/nested-env-dict-attributeerror-785
Feb 18, 2026
Merged

Fix AttributeError with nested env vars for dict fields (#785)#786
hramezani merged 4 commits intomainfrom
fix/nested-env-dict-attributeerror-785

Conversation

@hramezani
Copy link
Copy Markdown
Member

Fixes #785

hramezani and others added 3 commits February 17, 2026 17:39
When using env_nested_delimiter with dict fields having simple value types
(e.g. dict[str, str]), next_field() returns a raw type instead of FieldInfo.
The code in explode_env_vars assumed target_field was always a FieldInfo,
causing AttributeError on .annotation access.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hramezani hramezani enabled auto-merge (squash) February 18, 2026 08:18
@hramezani hramezani merged commit 58b236a into main Feb 18, 2026
19 checks passed
@hramezani hramezani deleted the fix/nested-env-dict-attributeerror-785 branch February 18, 2026 08:20
@hramezani hramezani mentioned this pull request Feb 19, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AttributeError with nested environment variables in version 2.13.0

1 participant