Completed
Push — master ( 74046a...4c11f7 )
by Oleksandr
01:30
created

Turbulence

Complexity

Total Complexity 0

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 4
Bugs 0 Features 0
Metric Value
wmc 0
c 4
b 0
f 0
dl 0
loc 6
ccs 6
cts 6
cp 1
1
# coding: utf-8
2
3 1
from candv import Values, VerboseValueConstant, with_constant_class
4
5 1
from .utils import translations
6
7
8 1
_ = translations.ugettext_lazy
9
10
11 1
class ConditionType(VerboseValueConstant):
12
    pass
13
14
15 1
class Conditions(with_constant_class(ConditionType), Values):
16 1
    clear = ConditionType(0, _("clear"))
17 1
    good = ConditionType(1, _("good"))
18 1
    hazy = ConditionType(2, _("hazy"))
19 1
    poor = ConditionType(3, _("poor"))
20 1
    blind = ConditionType(4, _("blind"))
21 1
    precipitation = ConditionType(5, _("precipitation"))
22 1
    thunderstorm = ConditionType(6, _("thunderstorm"))
23
24
25 1
class GustType(VerboseValueConstant):
26
    pass
27
28
29 1
class Gust(with_constant_class(GustType), Values):
30 1
    none = GustType(0, _("none"))
31 1
    low = GustType(8, _("low_gust"))
32 1
    moderate = GustType(10, _("moderate_gust"))
33 1
    strong = GustType(12, _("strong_gust"))
34
35
36 1
class TurbulenceType(VerboseValueConstant):
37
    pass
38
39
40 1
class Turbulence(with_constant_class(TurbulenceType), Values):
41 1
    none = TurbulenceType(0, _("none"))
42 1
    low = TurbulenceType(3, _("low_turbulence"))
43 1
    moderate = TurbulenceType(4, _("moderate_turbulence"))
44 1
    strong = TurbulenceType(5, _("strong_turbulence"))
45
    very_strong = TurbulenceType(6, _("very_strong_turbulence"))
46