-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use the un-underscored name if no alias attribute is there. #416
Conversation
Ah, cool. Can you add a changelog note? And a simple test would be great so it doesn't happen again. |
Actually -- given that |
Howdy, any progress on this? Trying to plan the next release. |
Whoops, sorry - forgot about this PR, working on an updated version now! |
This modern version of `attrs` provides the `alias` attribute on fields that contains the name we should use here. Also add a test to verify that structuring and unstructuring aliased attributes (which can be triggered by prefixing an attribute with an underscore) works as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, left a comment
tests/test_converter.py
Outdated
A class with an aliased attribute can be unstructured and structured. | ||
""" | ||
|
||
converter = Converter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should be testing this with a BaseConverter
to hit the changed code path, the Converter
uses different machinery.
Just a small note, I'll be away for the next 3 weeks on a family trip and I can continue reviewing this after I'm back! |
I want to get the next release out so I fixed this myself. Thanks! |
This appears to be caused by a thinko in #391, this fixes it again.