You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And when running mypy, I'm getting the following errors:
error: Argument 1 to "to_representation" of "Field" has incompatible type "DecimalSerializerMethodField"; expected "Field[_VT, _DT, _RP, _IN]"
error: Argument 1 to "to_representation" of "Field" has incompatible type "DecimalSerializerMethodField"; expected "Field[_VT, _DT, _RP, _IN]"
error: Argument 2 to "to_representation" of "Field" has incompatible type "_RP"; expected "_VT"
Now, I understand, that this is because I'm calling other_class.method(self, ...), but I'm not sure on how to workaround it.
My question, is how to correctly implement this class, while keeping typing intact?
Thanks
The text was updated successfully, but these errors were encountered:
Question
I have a class that looks something like this:
And when running mypy, I'm getting the following errors:
Now, I understand, that this is because I'm calling
other_class.method(self, ...)
, but I'm not sure on how to workaround it.My question, is how to correctly implement this class, while keeping typing intact?
Thanks
The text was updated successfully, but these errors were encountered: