| Conditions | 4 |
| Total Lines | 18 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 4.0058 |
| Changes | 0 | ||
| 1 | 1 | import json |
|
| 31 | 1 | def prepare_data(self, rules): |
|
| 32 | 1 | out = [] |
|
| 33 | 1 | rule = None |
|
| 34 | 1 | out_oval_tree_dict = dict() |
|
| 35 | 1 | for rule in rules['rules']: |
|
| 36 | 1 | try: |
|
| 37 | 1 | out_oval_tree_dict[ |
|
| 38 | rule + self.date] = self.create_dict_of_rule(rule) |
||
| 39 | 1 | except NotChecked as error: |
|
| 40 | out_oval_tree_dict[ |
||
| 41 | rule + self.date] = str(error) |
||
| 42 | 1 | if self.out is not None: |
|
| 43 | 1 | self.save_dict_as_json(out_oval_tree_dict, self.out) |
|
| 44 | 1 | out.append(self.out) |
|
| 45 | else: |
||
| 46 | 1 | print( |
|
| 47 | str(json.dumps(out_oval_tree_dict, sort_keys=False, indent=4))) |
||
| 48 | 1 | return out |
|
| 49 | |||
| 53 |