add argument to service for customizing json encoder#59
add argument to service for customizing json encoder#59behrmann merged 2 commits intovarlink:masterfrom
Conversation
Add a new argument to the Service class so that code using that class can specify a custom json encoder class, ideally one that subclasses from VarlinkEncoder. Signed-off-by: John Mulligan <jmulligan@redhat.com>
62d88d7 to
71473bc
Compare
|
Updated to fix I'd prefer to have tox run the ruff commands so I may follow up this PR with a new PR that moves the ruff rules into the tox.ini and invoke those from tox instead of from the github workflow directly. That way it's harder to miss when checking things locally. :-) |
Happy to take that, but not as |
behrmann
left a comment
There was a problem hiding this comment.
Thanks! I think this is a nice start. I think similar decoding support would also make sense to add, but having a pluggable encoder is, I think, a good start.
Add a new test file to verify that the json_encoder_cls argument can be given to the Service to specify a custom encoder. Signed-off-by: John Mulligan <jmulligan@redhat.com>
71473bc to
82ada90
Compare
OK. I haven't done the research yet, but if tox can't use both at the same time in one project would you like to see the tox.ini file removed? |
|
Yes, the |
|
Sorry for the slow turnaround, @phlogistonjohn, I simply forgot pressing merge. |
Fixes: #58
This is my first contribution here so let me know if I missed any process items that I missed.