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
The simple solution to this bug is to add the following method to the MixingEnum class:
def json(self, **kwargs):
"""Return a JSON-compliant serialization of the enumeration"""
return self.value if isinstance(self.value, str) else self.value.json(**kwargs)
However, upon writing test, I noticed that a MixingQuery with all zero angles and phases gives an empty dict as it's JSON representation. This is because both angle and phase default to zero for the RotationQuery class, but do we want to seralize a NoMixing to an empty dict? Take the following example:
Mixing Enum has no attribute
json
To reproduce
The text was updated successfully, but these errors were encountered: