| Conditions | 5 |
| Total Lines | 14 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | from typing import Dict, Any |
||
| 22 | @staticmethod |
||
| 23 | def get_hashable_id(val): |
||
| 24 | if not isinstance(val, dict): |
||
| 25 | return val |
||
| 26 | type_prop = val.get("@type", None) |
||
| 27 | if not type_prop == "janusgraph:RelationIdentifier": |
||
| 28 | return val |
||
| 29 | val_prop = val.get("@value", None) |
||
| 30 | if not isinstance(val_prop, dict): |
||
| 31 | return val |
||
| 32 | rel_prop = val_prop.get("relationId", None) |
||
| 33 | if not rel_prop: |
||
| 34 | return val |
||
| 35 | return rel_prop |
||
| 36 | |||
| 37 |