Completed
Push — master ( a55149...0becad )
by Oleksandr
02:02
created

SupportedLanguages   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A get_default() 0 3 1
1
# -*- coding: utf-8 -*-
2
3 1
from candv import SimpleConstant, Constants, Values, VerboseValueConstant
4
5 1
from .utils import translations
6
7
8 1
_ = translations.ugettext_lazy
9
10
11 1
class SupportedLanguages(Constants):
12 1
    en = SimpleConstant()
13 1
    ru = SimpleConstant()
14
15 1
    @classmethod
16
    def get_default(cls):
17 1
        return cls.en
18
19
20 1
class Skills(Values):
21 1
    rookie = VerboseValueConstant(0, _("rookie"))
22 1
    average = VerboseValueConstant(1, _("average"))
23 1
    veteran = VerboseValueConstant(2, _("veteran"))
24 1
    ace = VerboseValueConstant(3, _("ace"))
25
26
27 1
class UnitTypes(Values):
28 1
    aircraft = VerboseValueConstant('planes', _("aircraft"))
29 1
    armor = VerboseValueConstant('armor', _("armor"))
30 1
    artillery = VerboseValueConstant('artillery', _("artillery"))
31 1
    balloon = VerboseValueConstant('aeronautics', _("balloon"))
32 1
    light = VerboseValueConstant('lights', _("light"))
33 1
    radio = VerboseValueConstant('radios', _("radio"))
34 1
    ship = VerboseValueConstant('ships', _("ship"))
35 1
    stationary = VerboseValueConstant('stationary', _("stationary"))
36 1
    train = VerboseValueConstant('trains', _("train"))
37
    vehicle = VerboseValueConstant('vehicles', _("vehicle"))
38