Unable to annotate any partialmethod used in SerializerMethodField #451
Labels
enhancement
New feature or request
fix confirmation pending
issue has been fixed and confirmation from issue reporter is pending
Describe the bug
When a serializer defines any
SerializerMethodField
as afunctools.partialmethod
is impossible to specify any extra attribute on this method, thus resulting in a typerror.To Reproduce
Just define a basic serializer with a partialmethod:
This will throw the abovementioned error.
Expected behavior
No error should be thrown, if type annotation was setted on base method it should be used.
As of now a partialmethod object can be recognized since it has an attribute called
_partialmethod
where it stores the original partial object which is called by the interpreter.The text was updated successfully, but these errors were encountered: