Conditions | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 2.0625 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | # coding: utf-8 |
||
7 | 1 | def get_2d_pos_transformer( |
|
8 | dst_field_name='pos', |
||
9 | src_x_field_name='pos_x', |
||
10 | src_y_field_name='pos_y', |
||
11 | ): |
||
12 | |||
13 | 1 | def _transformer(data): |
|
14 | data[dst_field_name] = Point2D( |
||
15 | float(data.pop(src_x_field_name)), |
||
16 | float(data.pop(src_y_field_name)), |
||
17 | ) |
||
18 | |||
19 | 1 | return _transformer |
|
20 | |||
50 |