| Conditions | 1 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 1.0156 |
| Changes | 0 | ||
| 1 | 1 | from .belligerents import BELLIGERENTS |
|
| 5 | 1 | def get_2d_pos_transformer( |
|
| 6 | dst_field_name='pos', |
||
| 7 | src_x_field_name='pos_x', |
||
| 8 | src_y_field_name='pos_y', |
||
| 9 | ): |
||
| 10 | |||
| 11 | 1 | def _transformer(data): |
|
| 12 | data[dst_field_name] = Point2D( |
||
| 13 | float(data.pop(src_x_field_name)), |
||
| 14 | float(data.pop(src_y_field_name)), |
||
| 15 | ) |
||
| 16 | |||
| 17 | 1 | return _transformer |
|
| 18 | |||
| 48 |