8000 fix: honour goodconf.Field(alias=...) when loading by marcgibbons · Pull Request #160 · lincolnloop/goodconf · GitHub
[go: up one dir, main page]

Skip to content

fix: honour goodconf.Field(alias=...) when loading - #160

Merged
marcgibbons merged 1 commit into
mainfrom
fix-field-alias
Nov 27, 2026
Merged

marcgibbons merged 1 commit into
mainfrom
fix-field-alias

Conversation

@marcgibbons
Copy link
Copy Markdown
Contributor

Fixes #152

  • goodconf.Field delegates to pydantic.Field, so alias propagates to validation_alias/serialization_alias
  • Kwargs forwarded as a plain dict: pydantic.Field's overloads reject an unpacked TypedDict; callers keep the typed signature
  • Test loads an aliased key from JSON, TOML and YAML

Delegate to pydantic.Field so alias propagates to validation_alias and
serialization_alias.

#152
@codecov
codec 8000 ov Bot commented Nov 27, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8a36447) to head (8eefb4c).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #160   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           18        18           
  Lines          977       986    +9     
  Branches         6         6           
=========================================
+ Hits           977       986    +9     
Flag Coverage Δ
dev 100.00% <100.00%> (ø)
py311-django52 100.00% <100.00%> (ø)
py312-django60 100.00% <100.00%> (ø)
py313-django60 100.00% <100.00%> (ø)
py314-django60 100.00% <100.00%> (ø)
py315-django61 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@marcgibbons
marcgibbons marked this pull request as ready for review November 27, 2026 18:53
@marcgibbons
marcgibbons merged commit b6a58ba into main Nov 27, 2026
15 checks passed
@marcgibbons
marcgibbons deleted the fix-field-alias branch November 27, 2026 18:53
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.

goodconf.Field(alias=...) is ignored when loading

1 participant

0