Match original argument names#5889
Merged
carltongibson merged 1 commit intoencode:masterfrom Apr 20, 2018
decibyte:docs-match-original-argument-names
Merged
Match original argument names#5889carltongibson merged 1 commit intoencode:masterfrom decibyte:docs-match-original-argument-names
carltongibson merged 1 commit intoencode:masterfrom
decibyte:docs-match-original-argument-names
Conversation
Change argument names in overridden field methods to match those of the base classes.
Contributor
|
Side note, the signature differs in the various classes within the DRF code itself: |
pchiquet
pushed a commit
to pchiquet/django-rest-framework
that referenced
this pull request
Nov 17, 2020
Change argument names in overridden field methods to match those of the base classes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Update custom field documentation. Change argument names in overridden field methods to match those of the base classes.
I got the following warning from
pylint:Then I returned to the docs just to realise that I did exactly what it said. A look at the source revealed that the warning was actually correct: The name of the second argument to
to_representationisvalue, notobj.To help others avoid warnings like these, I propose these changes to the docs. But if the argument names have deliberately been altered, feel free to reject this :)