-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Extract method for manual_fields
processing
#5633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract method for manual_fields
processing
#5633
Conversation
Allows reuse of logic to replace Field instances in a field list by `Field.name`. Adds a utility function for the logic plus a wrapper method on `AutoSchema`. Closes encode#5632
@rpkilby Can you just cast your eye over this please? General approach etc. I'll add an explicit test on Ta. |
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've opened carltongibson#2 with suggestions.
* Use OrderedDict in inspectors * Move empty check to 'update_fields()' * Make 'update_fields()' an AutoSchema staticmethod * Add 'AutoSchema.get_manual_fields()' * Conform '.get_manual_fields()' to other methods
Proposed changes merged. Thanks @rpkilby!
(As documented to be)
* `get_manual_fields` * `update_fields`
865fc7d
to
7dc903f
Compare
OK. I think this is ready to go. |
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.
changes looks good to get in
* Extract method for `manual_fields` processing Allows reuse of logic to replace Field instances in a field list by `Field.name`. Adds a utility function for the logic plus a wrapper method on `AutoSchema`. Closes encode#5632 * Manual fields suggestions (encode#2) * Use OrderedDict in inspectors * Move empty check to 'update_fields()' * Make 'update_fields()' an AutoSchema staticmethod * Add 'AutoSchema.get_manual_fields()' * Conform '.get_manual_fields()' to other methods * Add test for update_fields * Make sure `manual_fields` is a list. (As documented to be) * Add docs for new AutoSchema methods. * `get_manual_fields` * `update_fields` * Add release notes for PR.
Allows reuse of logic to replace Field instances in a field list by
Field.name
.Adds a utility function for the logic plus a wrapper method on
AutoSchema
.Closes #5632
TODO: