-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
Update Field constructor kwargs-only parameters #491
Update Field constructor kwargs-only parameters #491
Conversation
The number of allowed positional parameters was significantly reduced by DRF upstream, but some remain regardless.
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 we need a stubtest
for this :(
Agreed, stubtest would help for sure and it's on my radar. I've assigned #434 to myself. |
…gs-only-parameters
Marking as draft until #493 is merged. |
Updated this PR. |
rest_framework.fields.Field.__init__ | ||
rest_framework.fields.FilePathField.__init__ |
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.
Note: some XxxField.__init__
methods remain because our argument types aren't precise. But I'd rather fix that separately.
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.
stubtest gives a lot of confidence! Thanks!
I have made things!
The number of allowed positional parameters of
Field
class constructors was significantly reduced by DRF upstream, but some remain regardless.Also correctly reordered arguments where positional args are allowed.
Related issues