| Conditions | 1 |
| Total Lines | 8 |
| Code Lines | 2 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | def default_complex_serializer(obj: complex, **_) -> dict: |
||
| 2 | """ |
||
| 3 | Serialize a complex as a dict. |
||
| 4 | :param obj: the complex. |
||
| 5 | :param _: not used. |
||
| 6 | :return: a ``dict``. |
||
| 7 | """ |
||
| 8 | return {'real': obj.real, 'imag': obj.imag} |
||
| 9 |