| Conditions | 3 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| 1 | """Functions to interact with mapped classes and instances.""" |
||
| 27 | 1 | elif create: |
|
| 28 | 1 | return save(instance) |
|
| 29 | else: |
||
| 30 | 1 | return None |
|
| 31 | |||
| 32 | |||
| 33 | 1 | def load(cls, **kwargs): |
|
| 34 | """Return a list of all matching mapped objects.""" |
||
| 35 | 1 | log.debug((cls, kwargs)) |
|
| 36 | 1 | raise NotImplementedError |
|
| 37 | |||
| 38 | |||
| 39 | 1 | def save(instance): |
|
| 40 | """Save a mapped object to file.""" |
||
| 41 | 1 | mapper = _ensure_mapped(instance) |
|
| 42 | |||
| 43 | 1 | if mapper.deleted: |
|
| 76 |