Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

fix: Ensure sets can be serialized #608

Merged
merged 1 commit into from
Aug 19, 2022
Merged

fix: Ensure sets can be serialized #608

merged 1 commit into from
Aug 19, 2022

Conversation

silasary
Copy link
Collaborator

What type of pull request is this?

  • Non-breaking code change
  • Breaking code change
  • Documentation change/addition
  • Tests change

Description

In order to serialize sets, we either:

  • need to do it in the serializer level, with a defaults= parameter when we call json.dumps
  • need to convert them to something the default serializer can handle.

Because we don't control aioclient's serializer, I opted with the easier second option.

Changes

Changed the existing dict_filter_missing function to also process sets into lists.

Checklist

  • I've formatted my code with Black
  • I've ensured my code works on Python 3.10.x
  • I've tested my code

@silasary silasary added the Improvement Something that is already implemented but can be done better label Aug 18, 2022
@LordOfPolls LordOfPolls merged commit b7f495b into dev Aug 19, 2022
@LordOfPolls LordOfPolls deleted the filter-sets branch August 19, 2022 19:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Improvement Something that is already implemented but can be done better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants