Skip to content
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

Direction of serialisation (and kwarg cls overloaded incorrectly) should be resolved in validators #41

Open
thclark opened this issue Oct 12, 2020 · 0 comments
Assignees
Labels
bug Unintended behaviour in any area of the app

Comments

@thclark
Copy link
Collaborator

thclark commented Oct 12, 2020

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 in load_json and essentially gets popped from the kwargs. here.

Perhaps it's as simple as renaming this cls argument e.g. to klass, 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.

@thclark thclark added bug Unintended behaviour in any area of the app validating labels Oct 12, 2020
@thclark thclark self-assigned this Oct 12, 2020
@thclark thclark removed this from Octue Board Dec 1, 2021
@thclark thclark moved this to Priority 1 (Low) in Octue Board Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unintended behaviour in any area of the app
Projects
Status: Priority 1 (Low)
Development

No branches or pull requests

2 participants