Flexible Python configuration system. The last one you will ever need.
BSD 3-Clause "New" or "Revised" License
1.88k
stars
98
forks
source link
fix: `SCMode.INSTANTIATE` for attrs fields with aliases/leading "_" #1135
Closed
bzczb closed 6 months ago
Motivation
attrs
classes automatically alias any fields with a leading underscore to a stripped version in that class's__init__()
. So, the classhas an
__init__()
that looks like:This PR changes the structured config instantiation behavior to take aliases into account, when setting up the params for an
__init__()
.Test Plan
Test
test_leading_underscore_fields()
added.Fixes
Fixes #1063