Conditions | 1 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 1 |
Changes | 0 |
1 | # -*- coding: utf-8 -*- |
||
22 | 1 | def clean(self): |
|
23 | """ |
||
24 | Redefines base method. See :meth:`SectionParser.clean` for |
||
25 | semantics. |
||
26 | """ |
||
27 | 1 | weather_conditions = int(self.data['CloudType']) |
|
28 | 1 | return { |
|
29 | 'location_loader': self.data['MAP'], |
||
30 | 'time': { |
||
31 | 'value': to_time(self.data['TIME']), |
||
32 | 'is_fixed': 'TIMECONSTANT' in self.data, |
||
33 | }, |
||
34 | 'weather_conditions': Conditions.get_by_value(weather_conditions), |
||
35 | 'cloud_base': int(float(self.data['CloudHeight'])), |
||
36 | 'player': { |
||
37 | 'belligerent': to_belligerent(self.data['army']), |
||
38 | 'flight_id': self.data.get('player'), |
||
39 | 'aircraft_index': int(self.data['playerNum']), |
||
40 | 'fixed_weapons': 'WEAPONSCONSTANT' in self.data, |
||
41 | }, |
||
43 |