This repository was archived by the owner on Jul 19, 2025. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork24
Tags: codeclimate/codeclimate-duplication
Tags
b1295
Python: don't crash on complex-number literals (#364)Complex literals cannot be serialised directly to JSON, but Python's ASTreports them as constant numeric values. Ruby's `to_json` methodserialies complex numbers to their string representations, so we dosimilar here. An alternative would be to serialise to a two-elementlist of the real and imaginary parts.
PreviousNext