Conditions | 1 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 1 |
1 | # -*- coding: utf-8 -*- |
||
21 | 1 | def clean(self): |
|
22 | """ |
||
23 | Redefines base method. See :meth:`SectionParser.clean` for |
||
24 | semantics. |
||
25 | """ |
||
26 | 1 | gust = int(self.data['Gust']) |
|
27 | 1 | turbulence = int(self.data['Turbulence']) |
|
28 | 1 | return { |
|
29 | 'weather': { |
||
30 | 'wind': { |
||
31 | 'direction': float(self.data['WindDirection']), |
||
32 | 'speed': float(self.data['WindSpeed']), |
||
33 | }, |
||
34 | 'gust': Gust.get_by_value(gust), |
||
35 | 'turbulence': Turbulence.get_by_value(turbulence), |
||
36 | }, |
||
38 |