| Total Complexity | 3 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | import json |
||
| 12 | class SmartPriceBase(object): |
||
| 13 | def __init__(self, params): |
||
| 14 | self.__dict__.update(params) |
||
| 15 | |||
| 16 | def jsonable(self): |
||
| 17 | return self.__dict__ |
||
| 18 | |||
| 19 | @property |
||
| 20 | def dumptojson(self): |
||
| 21 | return json.loads( |
||
| 22 | json.dumps( |
||
| 23 | self.jsonable(), |
||
| 24 | cls=ComplexEncoder, |
||
| 25 | # sort_keys=True, |
||
| 26 | indent=4, |
||
| 27 | separators=(',', ': ')) |
||
| 28 | ) |
||
| 37 |