| Total Complexity | 2 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| 1 | # -*- coding: utf-8 -*- |
||
| 6 | 1 | class RespawnTimeSectionParser(ValuesParser): |
|
| 7 | """ |
||
| 8 | Parses ``RespawnTime`` section. |
||
| 9 | View :ref:`detailed description <respawn-time-section>`. |
||
| 10 | """ |
||
| 11 | |||
| 12 | 1 | def check_section_name(self, section_name): |
|
| 13 | 1 | return section_name == "RespawnTime" |
|
| 14 | |||
| 15 | 1 | def clean(self): |
|
| 16 | 1 | return { |
|
| 17 | 'respawn_time': { |
||
| 18 | 'ships': { |
||
| 19 | 'big': int(self.data['Bigship']), |
||
| 20 | 'small': int(self.data['Ship']), |
||
| 21 | }, |
||
| 22 | 'balloons': int(self.data['Aeroanchored']), |
||
| 23 | 'artillery': int(self.data['Artillery']), |
||
| 24 | 'searchlights': int(self.data['Searchlight']), |
||
| 25 | }, |
||
| 27 |