Direction of serialisation (and kwarg cls
overloaded incorrectly) should be resolved in validators
#41
Labels
bug
Unintended behaviour in any area of the app
In the twine validation methods e.g. here the
cls
keyword is overloaded, in order to determine the serialisation direction and correctly cast inbound classes to objects.However, this may not be the best design, as a
cls
keyword argument is also accepted by the lower level json decoders inload_json
and essentially gets popped from the kwargs. here.Perhaps it's as simple as renaming this
cls
argument e.g. toklass
, but more likely we want to provide a decoder rather than a map.Trick is: This decoder needs to be called where
load_json
receives a source object too.The text was updated successfully, but these errors were encountered: